vertigo_vhdl 0.8.12 → 0.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vertigo/parser.rb +3 -0
- data/lib/vertigo/tb_generator.rb +2 -2
- data/lib/vertigo/version.rb +1 -1
- data/tests/parser_tests/test_LUT.vhd +62 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8378d338d4ebc178cf5fec08f6aa2e0601cd0119bd684d29acf1980115fbed2
|
4
|
+
data.tar.gz: 965c56bc3bca0c562b6f11e55f498a31c720e68e56fac9b40a6d09d0eb2f885e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad5d0885aa192abba0fc562e62ff689efa2e7253950d113998165489bd5c06c6b85f4510852dedd01710e87afd4dc65b1d10ac8d03ef08d837e30d51c3358d95
|
7
|
+
data.tar.gz: 631cafa7550689910810e11677ab4138146e545dc64e2b7de0872f2b8f61abc05a74c700359f3c46b1e5c89c7b32114cf433f5274d0b5a9b4d4bd86a8bc68e2a
|
data/lib/vertigo/parser.rb
CHANGED
data/lib/vertigo/tb_generator.rb
CHANGED
@@ -68,9 +68,9 @@ module Vertigo
|
|
68
68
|
code.newline
|
69
69
|
code << "procedure toggle(signal s : inout std_logic) is"
|
70
70
|
code << "begin"
|
71
|
-
code << " wait until rising_edge(
|
71
|
+
code << " wait until rising_edge(#{@clk_name});"
|
72
72
|
code << " s <=not(s);"
|
73
|
-
code << " wait until rising_edge(
|
73
|
+
code << " wait until rising_edge(#{@clk_name});"
|
74
74
|
code << " s <=not(s);"
|
75
75
|
code << "end procedure;"
|
76
76
|
code.newline
|
data/lib/vertigo/version.rb
CHANGED
@@ -0,0 +1,62 @@
|
|
1
|
+
-- ghdl -a [nom].vhd
|
2
|
+
-- vertigo --gen_tb [nom].vhd
|
3
|
+
-- ghdl -a [nom_tb].vhd
|
4
|
+
-- ghdl -e [nom_tb]
|
5
|
+
-- ghdl -r [nom_tb]
|
6
|
+
-- ghdl -r [nom_tb] --wave=[nom_wave].ghw
|
7
|
+
-- gtkwave [nom].ghw
|
8
|
+
|
9
|
+
library ieee;
|
10
|
+
use ieee.std_logic_1164.all;
|
11
|
+
use ieee.numeric_std.all;
|
12
|
+
|
13
|
+
entity LUT is
|
14
|
+
port (
|
15
|
+
clk : in std_logic;
|
16
|
+
rst : in std_logic;
|
17
|
+
push : in std_logic;
|
18
|
+
a : in std_logic;
|
19
|
+
b : in std_logic;
|
20
|
+
bitstream : in std_logic;
|
21
|
+
f : out std_logic
|
22
|
+
|
23
|
+
);
|
24
|
+
end LUT;
|
25
|
+
|
26
|
+
architecture arch of LUT is
|
27
|
+
signal Q : std_logic_vector (3 downto 0);
|
28
|
+
signal T : std_logic_vector (1 downto 0);
|
29
|
+
begin
|
30
|
+
|
31
|
+
process(clk, rst) is
|
32
|
+
begin
|
33
|
+
|
34
|
+
if rst = '0' then
|
35
|
+
Q(0) <= '0';
|
36
|
+
Q(1) <= '0';
|
37
|
+
Q(2) <= '0';
|
38
|
+
Q(3) <= '0';
|
39
|
+
|
40
|
+
elsif rising_edge(clk) then
|
41
|
+
if push = '1' then
|
42
|
+
Q(0) <= bitstream;
|
43
|
+
Q(1) <= Q(0);
|
44
|
+
Q(2) <= Q(1);
|
45
|
+
Q(3) <= Q(2);
|
46
|
+
end if;
|
47
|
+
end if;
|
48
|
+
end process;
|
49
|
+
|
50
|
+
process (a, b) is
|
51
|
+
begin
|
52
|
+
t(0) <= a;
|
53
|
+
t(1) <= b;
|
54
|
+
case t is
|
55
|
+
when "00" => f <= Q(0);
|
56
|
+
when "01" => f <= Q(1);
|
57
|
+
when "10" => f <= Q(2);
|
58
|
+
when "11" => f <= Q(3);
|
59
|
+
when others => f <= Q(0);
|
60
|
+
end case;
|
61
|
+
end process;
|
62
|
+
end arch;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertigo_vhdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Christophe Le Lann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby handwritten VHDL parser and utilities
|
14
14
|
email: jean-christophe.le_lann@ensta-bretagne.fr
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- tests/ghdl_tests/arbitre_tb.vhd
|
40
40
|
- tests/ghdl_tests/fsm.vhd
|
41
41
|
- tests/ghdl_tests/fsm_synth.vhd
|
42
|
+
- tests/parser_tests/test_LUT.vhd
|
42
43
|
- tests/parser_tests/test_MUST_fail.vhd
|
43
44
|
- tests/parser_tests/test_accelerator.vhd
|
44
45
|
- tests/parser_tests/test_adder_rca_vhdl93.vhd
|