summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Alejandro Melo <rmelo@inti.gob.ar>2017-12-01 13:25:14 -0300
committerRodrigo Alejandro Melo <rmelo@inti.gob.ar>2017-12-01 13:25:14 -0300
commit5ac1f1eba35fec83789c635b7b145474a77a5fde (patch)
treee1b20c07847f0615a5c6d8ad42dae60c419c6d5c
parent85b71acd10a5855bef8ab7dc05c11e2902493422 (diff)
downloadvhdl2vl-5ac1f1eba35fec83789c635b7b145474a77a5fde.tar.gz
vhdl2vl-5ac1f1eba35fec83789c635b7b145474a77a5fde.zip
Added unsupported things to todo.vhd
Applied a workaround in examples/Makefile to solve a dependency problem.
-rw-r--r--examples/Makefile1
-rw-r--r--examples/todo.vhd38
2 files changed, 37 insertions, 2 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 1d1399d..2ef61d3 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -6,6 +6,7 @@ all:
ifneq ($(shell which ghdl),)
@mkdir -p $(TEMP)
@echo "##### Checking examples with GHDL ##############################"
+ ghdl -a --workdir=$(TEMP) signextend.vhd
ghdl -a --workdir=$(TEMP) *.vhd
endif
diff --git a/examples/todo.vhd b/examples/todo.vhd
index 79b3e59..bd9e81f 100644
--- a/examples/todo.vhd
+++ b/examples/todo.vhd
@@ -3,6 +3,10 @@ use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity todo is
+ generic(
+ INBYLEVEL : boolean:=FALSE
+ --DEB_TIME : real:=50.0e-3 -- unexpected NAME, expecting ')' at "e"
+ );
port (
clk_i : in std_logic;
data_i : in std_logic_vector(7 downto 0);
@@ -16,6 +20,19 @@ architecture rtl of todo is
signal int : integer;
signal uns : unsigned(7 downto 0);
+
+ -- unexpected NAME at "rem"
+ --constant VALUE : positive := 9 rem 2;
+
+ constant BYTES : positive:=4;
+ constant WIDTH : positive:=BYTES*8;
+ signal index : natural range 0 to BYTES-1;
+ signal comma : std_logic_vector(BYTES*3-1 downto 0);
+
+ -- (others => (others => '0')) must be replaced by an initial block with a for
+ -- or something similar.
+ type ff_array is array (0 to 255) of std_logic_vector(7 downto 0);
+ signal data_r : ff_array :=(others => (others => '0'));
begin
--**************************************************************************
-- Wrong translations
@@ -31,7 +48,18 @@ begin
end if;
end loop;
end process test_i;
-
+ -- indexed part-select not applied
+ do_boundary: process (clk_i)
+ begin
+ if rising_edge(clk_i) then
+ for i in 0 to BYTES-1 loop
+ if comma(BYTES*2+i-1 downto BYTES+i)=comma(3 downto 0) then
+ index <= i;
+ end if;
+ end loop;
+ end if;
+ end process;
+ comma <= comma(BYTES+index-1 downto index);
--**************************************************************************
-- Translations which abort with syntax error (uncomment to test)
--**************************************************************************
@@ -42,5 +70,11 @@ begin
-- i => "00000000" & X"11", -- But here fail
-- o => open
-- );
-
+ -- unexpected NAME, expecting WHEN or ';'
+ --int <= 9 rem 2;
+ -- Unsupported generate with boolean?
+-- in_by_level:
+-- if INBYLEVEL generate
+-- int <= 9;
+-- end generate in_by_level;
end rtl;
OpenPOWER on IntegriCloud