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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3459a1e9abbe835d383e2137cfa7f34146d14d54813888019e75d72ac37a24d
4
- data.tar.gz: 9a02b22f74a9843113918dfcb26e7f97681c72244df7bdcaa4651549294dec16
3
+ metadata.gz: c8378d338d4ebc178cf5fec08f6aa2e0601cd0119bd684d29acf1980115fbed2
4
+ data.tar.gz: 965c56bc3bca0c562b6f11e55f498a31c720e68e56fac9b40a6d09d0eb2f885e
5
5
  SHA512:
6
- metadata.gz: e676079468bfc02a31d541aef60289f2da02a7daf90c59019e240e3eb5b833ed1ff94f4391398bc61fecae80ff62a255c5db1a809b12f4dae37f3ae019a507aa
7
- data.tar.gz: 2297f5a293fb186a4b4c7073b32d3a70af9df714835b8e58a1686c1757552629c0c6ec536ab0f18761d3d664b504b11952f325af89157392959f9ffd47978d48
6
+ metadata.gz: ad5d0885aa192abba0fc562e62ff689efa2e7253950d113998165489bd5c06c6b85f4510852dedd01710e87afd4dc65b1d10ac8d03ef08d837e30d51c3358d95
7
+ data.tar.gz: 631cafa7550689910810e11677ab4138146e545dc64e2b7de0872f2b8f61abc05a74c700359f3c46b1e5c89c7b32114cf433f5274d0b5a9b4d4bd86a8bc68e2a
@@ -669,6 +669,9 @@ module Vertigo
669
669
  if showNext.is_a?(:lparen)
670
670
  ret.sensitivity=parse_sensitivity_list
671
671
  end
672
+ if showNext.is_a? :is
673
+ acceptIt
674
+ end
672
675
  ret.decls=parse_decls
673
676
  ret.decls.flatten!
674
677
  expect :begin
@@ -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(clk);"
71
+ code << " wait until rising_edge(#{@clk_name});"
72
72
  code << " s <=not(s);"
73
- code << " wait until rising_edge(clk);"
73
+ code << " wait until rising_edge(#{@clk_name});"
74
74
  code << " s <=not(s);"
75
75
  code << "end procedure;"
76
76
  code.newline
@@ -1,3 +1,3 @@
1
1
  module Vertigo
2
- VERSION="0.8.12"
2
+ VERSION="0.8.14"
3
3
  end
@@ -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.12
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: 2023-02-15 00:00:00.000000000 Z
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