vertigo_vhdl 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vertigo/parser.rb +28 -5
  3. data/lib/vertigo/tb_generator.rb +1 -1
  4. data/lib/vertigo/version.rb +1 -1
  5. data/tests/parser_tests/test_adder_rca_vhdl93.vhd +37 -0
  6. metadata +4 -85
  7. data/tests/ghdl_tests/test_fsm.vhd +0 -162
  8. data/tests/parser_tests/else.vhd +0 -64
  9. data/tests/parser_tests/pingpong.vhd +0 -34
  10. data/tests/parser_tests/test_accelerator_pp.vhd +0 -144
  11. data/tests/parser_tests/test_aggregate_pp.vhd +0 -15
  12. data/tests/parser_tests/test_archi_1_pp.vhd +0 -41
  13. data/tests/parser_tests/test_array_array_00_pp.vhd +0 -25
  14. data/tests/parser_tests/test_array_urange_pp.vhd +0 -25
  15. data/tests/parser_tests/test_chu-1_pp.vhd +0 -104
  16. data/tests/parser_tests/test_concat_pp.vhd +0 -14
  17. data/tests/parser_tests/test_counter_pp.vhd +0 -35
  18. data/tests/parser_tests/test_de2_pp.vhd +0 -274
  19. data/tests/parser_tests/test_encode_pp.vhd +0 -2549
  20. data/tests/parser_tests/test_fsm_pp.vhd +0 -125
  21. data/tests/parser_tests/test_fsm_synth_pp.vhd +0 -197
  22. data/tests/parser_tests/test_function-01_pp.vhd +0 -18
  23. data/tests/parser_tests/test_lfsr_pp.vhd +0 -44
  24. data/tests/parser_tests/test_microwatt_cache_ram_pp.vhd +0 -68
  25. data/tests/parser_tests/test_microwatt_common_pp.vhd +0 -336
  26. data/tests/parser_tests/test_microwatt_control_pp.vhd +0 -187
  27. data/tests/parser_tests/test_microwatt_core_debug_pp.vhd +0 -104
  28. data/tests/parser_tests/test_microwatt_core_pp.vhd +0 -231
  29. data/tests/parser_tests/test_microwatt_core_tb_pp.vhd +0 -43
  30. data/tests/parser_tests/test_microwatt_countzero_pp.vhd +0 -120
  31. data/tests/parser_tests/test_microwatt_countzero_tb_pp.vhd +0 -70
  32. data/tests/parser_tests/test_microwatt_cr_file_pp.vhd +0 -74
  33. data/tests/parser_tests/test_microwatt_cr_hazard_pp.vhd +0 -51
  34. data/tests/parser_tests/test_microwatt_crhelpers_pp.vhd +0 -48
  35. data/tests/parser_tests/test_microwatt_dcache_pp.vhd +0 -481
  36. data/tests/parser_tests/test_microwatt_dcache_tb_pp.vhd +0 -98
  37. data/tests/parser_tests/test_microwatt_decode1_pp.vhd +0 -138
  38. data/tests/parser_tests/test_microwatt_decode2_pp.vhd +0 -300
  39. data/tests/parser_tests/test_microwatt_decode_types_pp.vhd +0 -67
  40. data/tests/parser_tests/test_microwatt_divider_pp.vhd +0 -132
  41. data/tests/parser_tests/test_microwatt_divider_tb_pp.vhd +0 -95
  42. data/tests/parser_tests/test_microwatt_dmi_dtm_dummy_pp.vhd +0 -29
  43. data/tests/parser_tests/test_microwatt_dmi_dtm_tb_pp.vhd +0 -197
  44. data/tests/parser_tests/test_microwatt_dmi_dtm_xilinx_pp.vhd +0 -139
  45. data/tests/parser_tests/test_microwatt_execute1_pp.vhd +0 -689
  46. data/tests/parser_tests/test_microwatt_fetch1_pp.vhd +0 -88
  47. data/tests/parser_tests/test_microwatt_fetch2_pp.vhd +0 -79
  48. data/tests/parser_tests/test_microwatt_glibc_random_helpers_pp.vhd +0 -25
  49. data/tests/parser_tests/test_microwatt_glibc_random_pp.vhd +0 -41
  50. data/tests/parser_tests/test_microwatt_gpr_hazard_pp.vhd +0 -68
  51. data/tests/parser_tests/test_microwatt_helpers_pp.vhd +0 -153
  52. data/tests/parser_tests/test_microwatt_icache_pp.vhd +0 -337
  53. data/tests/parser_tests/test_microwatt_icache_tb_pp.vhd +0 -104
  54. data/tests/parser_tests/test_microwatt_insn_helpers_pp.vhd +0 -208
  55. data/tests/parser_tests/test_microwatt_loadstore1_pp.vhd +0 -222
  56. data/tests/parser_tests/test_microwatt_logical_pp.vhd +0 -87
  57. data/tests/parser_tests/test_microwatt_multiply_pp.vhd +0 -84
  58. data/tests/parser_tests/test_microwatt_multiply_tb_pp.vhd +0 -75
  59. data/tests/parser_tests/test_microwatt_plru_pp.vhd +0 -46
  60. data/tests/parser_tests/test_microwatt_plru_tb_pp.vhd +0 -93
  61. data/tests/parser_tests/test_microwatt_ppc_fx_insns_pp.vhd +0 -665
  62. data/tests/parser_tests/test_microwatt_register_file_pp.vhd +0 -86
  63. data/tests/parser_tests/test_microwatt_rotator_pp.vhd +0 -149
  64. data/tests/parser_tests/test_microwatt_rotator_tb_pp.vhd +0 -134
  65. data/tests/parser_tests/test_microwatt_sim_bram_helpers_pp.vhd +0 -52
  66. data/tests/parser_tests/test_microwatt_sim_bram_pp.vhd +0 -53
  67. data/tests/parser_tests/test_microwatt_sim_console_pp.vhd +0 -43
  68. data/tests/parser_tests/test_microwatt_sim_jtag_pp.vhd +0 -64
  69. data/tests/parser_tests/test_microwatt_sim_jtag_socket_pp.vhd +0 -36
  70. data/tests/parser_tests/test_microwatt_sim_uart_pp.vhd +0 -90
  71. data/tests/parser_tests/test_microwatt_soc_pp.vhd +0 -195
  72. data/tests/parser_tests/test_microwatt_utils_pp.vhd +0 -39
  73. data/tests/parser_tests/test_microwatt_wishbone_arbiter_pp.vhd +0 -54
  74. data/tests/parser_tests/test_microwatt_wishbone_bram_tb_pp.vhd +0 -157
  75. data/tests/parser_tests/test_microwatt_wishbone_bram_wrapper_pp.vhd +0 -62
  76. data/tests/parser_tests/test_microwatt_wishbone_debug_master_pp.vhd +0 -124
  77. data/tests/parser_tests/test_microwatt_wishbone_types_pp.vhd +0 -38
  78. data/tests/parser_tests/test_microwatt_writeback_pp.vhd +0 -87
  79. data/tests/parser_tests/test_package-1_pp.vhd +0 -53
  80. data/tests/parser_tests/test_precedence_pp.vhd +0 -16
  81. data/tests/parser_tests/test_selected_sig_pp.vhd +0 -10
  82. data/tests/parser_tests/test_slice_pp.vhd +0 -16
  83. data/tests/parser_tests/test_tb-00_pp.vhd +0 -71
  84. data/tests/parser_tests/test_type_decl_02_pp.vhd +0 -11
  85. data/tests/parser_tests/test_use_pp.vhd +0 -10
  86. data/tests/parser_tests/test_while_1_pp.vhd +0 -26
  87. data/tests/parser_tests/test_with-00_pp.vhd +0 -12
  88. data/tests/tb_gen_tests/test_accelerator.vhd +0 -160
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e866afeff8d83a8d41c6f02a4084ff2133e33e761f4a56e630e0d66d18482d4
4
- data.tar.gz: 882a98fbeaa78f7d0c998a6949e473d02930edd11f76de78ecb38753958c7b05
3
+ metadata.gz: beaea4415336c64910ab051d6882dbc9e5320f65a9531a2862a336f30142d7ff
4
+ data.tar.gz: f190bce2287c4d40b69a191e5c34ae6bfaee628f3c19213ddec253d8c4fb6a0f
5
5
  SHA512:
6
- metadata.gz: 50dc9ace16e8d93780258eaa055ddb7cb42c53e470261b124cadfc6871603bde2e5e598d4414ff5bb788796f38cea09968b2aa14a98e696e6596ac8af2685bcb
7
- data.tar.gz: 9ec14b4037ff37532341cceacade51ad22d7859de92af2ac1927d582e168c21ac732992e6878600701999c6349302c2896141b578eaa2480af0c1b6773888466
6
+ metadata.gz: e35cadb37ba4f987501b079bc9c69f73bbb3d1699ec1966410448e4dd4637b26f5d3aa205121cf1fbebcf94c6ccf4de21dd21e121a3291793d6c264bfb980b32
7
+ data.tar.gz: 6bdd446db85780a7bd16214776651fed9896d6cfd5edf5e4a4fae483bb0b2d8323cf6d890722f346586f0e2ceabf0bbeefda219d46cfa65bc64cfd9fdebc76e9
@@ -801,12 +801,25 @@ module Vertigo
801
801
  expect :if
802
802
  ret.cond=parse_expression
803
803
  expect :generate
804
- if showNext.is_a?(:begin) # seems optional!
804
+ # maybe local declarations :
805
+ if showNext.is_a? [:signal,:constant]
806
+ while showNext.is_not_a?(:begin)
807
+ parse_decls
808
+ end
809
+ end
810
+
811
+ #...or simply "begin"
812
+ if showNext.is_a?(:begin)
805
813
  acceptIt
806
814
  end
807
- ret.body=parse_concurrent_stmt
815
+ ret.body=body=Body.new
816
+
817
+ while !showNext.is_a?(:end)
818
+ body << parse_concurrent_stmt
819
+ end
808
820
  expect :end
809
821
  expect :generate
822
+ maybe :ident
810
823
  expect :semicolon
811
824
  ret
812
825
  end
@@ -818,16 +831,26 @@ module Vertigo
818
831
  expect :in
819
832
  ret.range=parse_discrete_range
820
833
  expect :generate
821
- while showNext.is_not_a?(:begin)
822
- parse_decls
834
+
835
+ # maybe local declarations :
836
+ if showNext.is_a? [:signal,:constant]
837
+ while showNext.is_not_a?(:begin)
838
+ parse_decls
839
+ end
840
+ end
841
+
842
+ #...or simply "begin"
843
+ if showNext.is_a?(:begin)
844
+ acceptIt
823
845
  end
824
846
  ret.body=body=Body.new
825
- expect :begin
847
+
826
848
  while !showNext.is_a?(:end)
827
849
  body << parse_concurrent_stmt
828
850
  end
829
851
  expect :end
830
852
  expect :generate
853
+ maybe :ident
831
854
  expect :semicolon
832
855
  ret
833
856
  end
@@ -145,7 +145,7 @@ module Vertigo
145
145
  code << "report \"waiting for asynchronous reset\";"
146
146
  code << "wait until #{@reset_name}='1';"
147
147
  code << "wait_cycles(10);"
148
- code << "wait_cycles(100);"
148
+ code << "wait_cycles(200);"
149
149
  code << "report \"end of simulation\";"
150
150
  code << "running <= false;"
151
151
  code << "wait;"
@@ -1,3 +1,3 @@
1
1
  module Vertigo
2
- VERSION="0.8.9"
2
+ VERSION="0.8.10"
3
3
  end
@@ -0,0 +1,37 @@
1
+ library ieee;
2
+ use ieee.std_logic_1164.all;
3
+ use ieee.numeric_std.all;
4
+
5
+ architecture rca_vhdl_93 of adder is
6
+ signal co : std_logic_vector(N-1 downto 0);
7
+ begin
8
+
9
+ gen_loop: for i in 0 to N-1 generate
10
+
11
+ bit0 : if i=0 generate
12
+ fa_0: entity work.fa(arch)
13
+ port map(
14
+ a => a(0),
15
+ b => b(0),
16
+ ci => '0',
17
+ s => sum(0),
18
+ co => co(0)
19
+ );
20
+ end generate bit0;
21
+
22
+ other_bits : if i >0 generate
23
+ fa_i : entity work.fa(arch)
24
+ port map(
25
+ a => a(i),
26
+ b => b(i),
27
+ ci => co(i-1),
28
+ s => sum(i),
29
+ co => co(i)
30
+ );
31
+ end generate other_bits;
32
+
33
+ end generate gen_loop;
34
+
35
+ carry <= co(N-1);
36
+
37
+ end architecture;
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.9
4
+ version: 0.8.10
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: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-09-07 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
@@ -37,167 +37,86 @@ files:
37
37
  - lib/vertigo/visitor_vertigo_rkgen.rb
38
38
  - tests/ghdl_tests/fsm.vhd
39
39
  - tests/ghdl_tests/fsm_synth.vhd
40
- - tests/ghdl_tests/test_fsm.vhd
41
- - tests/parser_tests/else.vhd
42
- - tests/parser_tests/pingpong.vhd
43
40
  - tests/parser_tests/test_MUST_fail.vhd
44
41
  - tests/parser_tests/test_accelerator.vhd
45
- - tests/parser_tests/test_accelerator_pp.vhd
42
+ - tests/parser_tests/test_adder_rca_vhdl93.vhd
46
43
  - tests/parser_tests/test_aggregate.vhd
47
- - tests/parser_tests/test_aggregate_pp.vhd
48
44
  - tests/parser_tests/test_archi_1.vhd
49
- - tests/parser_tests/test_archi_1_pp.vhd
50
45
  - tests/parser_tests/test_array_array_00.vhd
51
- - tests/parser_tests/test_array_array_00_pp.vhd
52
46
  - tests/parser_tests/test_array_urange.vhd
53
- - tests/parser_tests/test_array_urange_pp.vhd
54
47
  - tests/parser_tests/test_chu-1.vhd
55
- - tests/parser_tests/test_chu-1_pp.vhd
56
48
  - tests/parser_tests/test_concat.vhd
57
- - tests/parser_tests/test_concat_pp.vhd
58
49
  - tests/parser_tests/test_counter.vhd
59
- - tests/parser_tests/test_counter_pp.vhd
60
50
  - tests/parser_tests/test_de2.vhd
61
- - tests/parser_tests/test_de2_pp.vhd
62
51
  - tests/parser_tests/test_encode.vhd
63
- - tests/parser_tests/test_encode_pp.vhd
64
52
  - tests/parser_tests/test_fsm.vhd
65
- - tests/parser_tests/test_fsm_pp.vhd
66
53
  - tests/parser_tests/test_fsm_synth.vhd
67
- - tests/parser_tests/test_fsm_synth_pp.vhd
68
54
  - tests/parser_tests/test_function-01.vhd
69
- - tests/parser_tests/test_function-01_pp.vhd
70
55
  - tests/parser_tests/test_lfsr.vhd
71
- - tests/parser_tests/test_lfsr_pp.vhd
72
56
  - tests/parser_tests/test_microwatt_cache_ram.vhd
73
- - tests/parser_tests/test_microwatt_cache_ram_pp.vhd
74
57
  - tests/parser_tests/test_microwatt_common.vhd
75
- - tests/parser_tests/test_microwatt_common_pp.vhd
76
58
  - tests/parser_tests/test_microwatt_control.vhd
77
- - tests/parser_tests/test_microwatt_control_pp.vhd
78
59
  - tests/parser_tests/test_microwatt_core.vhd
79
60
  - tests/parser_tests/test_microwatt_core_debug.vhd
80
- - tests/parser_tests/test_microwatt_core_debug_pp.vhd
81
- - tests/parser_tests/test_microwatt_core_pp.vhd
82
61
  - tests/parser_tests/test_microwatt_core_tb.vhd
83
- - tests/parser_tests/test_microwatt_core_tb_pp.vhd
84
62
  - tests/parser_tests/test_microwatt_countzero.vhd
85
- - tests/parser_tests/test_microwatt_countzero_pp.vhd
86
63
  - tests/parser_tests/test_microwatt_countzero_tb.vhd
87
- - tests/parser_tests/test_microwatt_countzero_tb_pp.vhd
88
64
  - tests/parser_tests/test_microwatt_cr_file.vhd
89
- - tests/parser_tests/test_microwatt_cr_file_pp.vhd
90
65
  - tests/parser_tests/test_microwatt_cr_hazard.vhd
91
- - tests/parser_tests/test_microwatt_cr_hazard_pp.vhd
92
66
  - tests/parser_tests/test_microwatt_crhelpers.vhd
93
- - tests/parser_tests/test_microwatt_crhelpers_pp.vhd
94
67
  - tests/parser_tests/test_microwatt_dcache.vhd
95
- - tests/parser_tests/test_microwatt_dcache_pp.vhd
96
68
  - tests/parser_tests/test_microwatt_dcache_tb.vhd
97
- - tests/parser_tests/test_microwatt_dcache_tb_pp.vhd
98
69
  - tests/parser_tests/test_microwatt_decode1.vhd
99
- - tests/parser_tests/test_microwatt_decode1_pp.vhd
100
70
  - tests/parser_tests/test_microwatt_decode2.vhd
101
- - tests/parser_tests/test_microwatt_decode2_pp.vhd
102
71
  - tests/parser_tests/test_microwatt_decode_types.vhd
103
- - tests/parser_tests/test_microwatt_decode_types_pp.vhd
104
72
  - tests/parser_tests/test_microwatt_divider.vhd
105
- - tests/parser_tests/test_microwatt_divider_pp.vhd
106
73
  - tests/parser_tests/test_microwatt_divider_tb.vhd
107
- - tests/parser_tests/test_microwatt_divider_tb_pp.vhd
108
74
  - tests/parser_tests/test_microwatt_dmi_dtm_dummy.vhd
109
- - tests/parser_tests/test_microwatt_dmi_dtm_dummy_pp.vhd
110
75
  - tests/parser_tests/test_microwatt_dmi_dtm_tb.vhd
111
- - tests/parser_tests/test_microwatt_dmi_dtm_tb_pp.vhd
112
76
  - tests/parser_tests/test_microwatt_dmi_dtm_xilinx.vhd
113
- - tests/parser_tests/test_microwatt_dmi_dtm_xilinx_pp.vhd
114
77
  - tests/parser_tests/test_microwatt_execute1.vhd
115
- - tests/parser_tests/test_microwatt_execute1_pp.vhd
116
78
  - tests/parser_tests/test_microwatt_fetch1.vhd
117
- - tests/parser_tests/test_microwatt_fetch1_pp.vhd
118
79
  - tests/parser_tests/test_microwatt_fetch2.vhd
119
- - tests/parser_tests/test_microwatt_fetch2_pp.vhd
120
80
  - tests/parser_tests/test_microwatt_glibc_random.vhd
121
81
  - tests/parser_tests/test_microwatt_glibc_random_helpers.vhd
122
- - tests/parser_tests/test_microwatt_glibc_random_helpers_pp.vhd
123
- - tests/parser_tests/test_microwatt_glibc_random_pp.vhd
124
82
  - tests/parser_tests/test_microwatt_gpr_hazard.vhd
125
- - tests/parser_tests/test_microwatt_gpr_hazard_pp.vhd
126
83
  - tests/parser_tests/test_microwatt_helpers.vhd
127
- - tests/parser_tests/test_microwatt_helpers_pp.vhd
128
84
  - tests/parser_tests/test_microwatt_icache.vhd
129
- - tests/parser_tests/test_microwatt_icache_pp.vhd
130
85
  - tests/parser_tests/test_microwatt_icache_tb.vhd
131
- - tests/parser_tests/test_microwatt_icache_tb_pp.vhd
132
86
  - tests/parser_tests/test_microwatt_insn_helpers.vhd
133
- - tests/parser_tests/test_microwatt_insn_helpers_pp.vhd
134
87
  - tests/parser_tests/test_microwatt_loadstore1.vhd
135
- - tests/parser_tests/test_microwatt_loadstore1_pp.vhd
136
88
  - tests/parser_tests/test_microwatt_logical.vhd
137
- - tests/parser_tests/test_microwatt_logical_pp.vhd
138
89
  - tests/parser_tests/test_microwatt_multiply.vhd
139
- - tests/parser_tests/test_microwatt_multiply_pp.vhd
140
90
  - tests/parser_tests/test_microwatt_multiply_tb.vhd
141
- - tests/parser_tests/test_microwatt_multiply_tb_pp.vhd
142
91
  - tests/parser_tests/test_microwatt_plru.vhd
143
- - tests/parser_tests/test_microwatt_plru_pp.vhd
144
92
  - tests/parser_tests/test_microwatt_plru_tb.vhd
145
- - tests/parser_tests/test_microwatt_plru_tb_pp.vhd
146
93
  - tests/parser_tests/test_microwatt_ppc_fx_insns.vhd
147
- - tests/parser_tests/test_microwatt_ppc_fx_insns_pp.vhd
148
94
  - tests/parser_tests/test_microwatt_register_file.vhd
149
- - tests/parser_tests/test_microwatt_register_file_pp.vhd
150
95
  - tests/parser_tests/test_microwatt_rotator.vhd
151
- - tests/parser_tests/test_microwatt_rotator_pp.vhd
152
96
  - tests/parser_tests/test_microwatt_rotator_tb.vhd
153
- - tests/parser_tests/test_microwatt_rotator_tb_pp.vhd
154
97
  - tests/parser_tests/test_microwatt_sim_bram.vhd
155
98
  - tests/parser_tests/test_microwatt_sim_bram_helpers.vhd
156
- - tests/parser_tests/test_microwatt_sim_bram_helpers_pp.vhd
157
- - tests/parser_tests/test_microwatt_sim_bram_pp.vhd
158
99
  - tests/parser_tests/test_microwatt_sim_console.vhd
159
- - tests/parser_tests/test_microwatt_sim_console_pp.vhd
160
100
  - tests/parser_tests/test_microwatt_sim_jtag.vhd
161
- - tests/parser_tests/test_microwatt_sim_jtag_pp.vhd
162
101
  - tests/parser_tests/test_microwatt_sim_jtag_socket.vhd
163
- - tests/parser_tests/test_microwatt_sim_jtag_socket_pp.vhd
164
102
  - tests/parser_tests/test_microwatt_sim_uart.vhd
165
- - tests/parser_tests/test_microwatt_sim_uart_pp.vhd
166
103
  - tests/parser_tests/test_microwatt_soc.vhd
167
- - tests/parser_tests/test_microwatt_soc_pp.vhd
168
104
  - tests/parser_tests/test_microwatt_utils.vhd
169
- - tests/parser_tests/test_microwatt_utils_pp.vhd
170
105
  - tests/parser_tests/test_microwatt_wishbone_arbiter.vhd
171
- - tests/parser_tests/test_microwatt_wishbone_arbiter_pp.vhd
172
106
  - tests/parser_tests/test_microwatt_wishbone_bram_tb.vhd
173
- - tests/parser_tests/test_microwatt_wishbone_bram_tb_pp.vhd
174
107
  - tests/parser_tests/test_microwatt_wishbone_bram_wrapper.vhd
175
- - tests/parser_tests/test_microwatt_wishbone_bram_wrapper_pp.vhd
176
108
  - tests/parser_tests/test_microwatt_wishbone_debug_master.vhd
177
- - tests/parser_tests/test_microwatt_wishbone_debug_master_pp.vhd
178
109
  - tests/parser_tests/test_microwatt_wishbone_types.vhd
179
- - tests/parser_tests/test_microwatt_wishbone_types_pp.vhd
180
110
  - tests/parser_tests/test_microwatt_writeback.vhd
181
- - tests/parser_tests/test_microwatt_writeback_pp.vhd
182
111
  - tests/parser_tests/test_package-1.vhd
183
- - tests/parser_tests/test_package-1_pp.vhd
184
112
  - tests/parser_tests/test_precedence.vhd
185
- - tests/parser_tests/test_precedence_pp.vhd
186
113
  - tests/parser_tests/test_selected_sig.vhd
187
- - tests/parser_tests/test_selected_sig_pp.vhd
188
114
  - tests/parser_tests/test_slice.vhd
189
- - tests/parser_tests/test_slice_pp.vhd
190
115
  - tests/parser_tests/test_tb-00.vhd
191
- - tests/parser_tests/test_tb-00_pp.vhd
192
116
  - tests/parser_tests/test_type_decl_02.vhd
193
- - tests/parser_tests/test_type_decl_02_pp.vhd
194
117
  - tests/parser_tests/test_use.vhd
195
- - tests/parser_tests/test_use_pp.vhd
196
118
  - tests/parser_tests/test_while_1.vhd
197
- - tests/parser_tests/test_while_1_pp.vhd
198
119
  - tests/parser_tests/test_with-00.vhd
199
- - tests/parser_tests/test_with-00_pp.vhd
200
- - tests/tb_gen_tests/test_accelerator.vhd
201
120
  homepage: http://www.github.com/JC-LL/vertigo
202
121
  licenses:
203
122
  - GPL-2.0-only
@@ -217,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
136
  - !ruby/object:Gem::Version
218
137
  version: '0'
219
138
  requirements: []
220
- rubygems_version: 3.0.6
139
+ rubygems_version: 3.2.3
221
140
  signing_key:
222
141
  specification_version: 4
223
142
  summary: VHDL parser and utilities
@@ -1,162 +0,0 @@
1
- library ieee;
2
- use ieee.std_logic_1164.all;
3
- use ieee.numeric_std.all;
4
- entity fsm is
5
- port (
6
- reset_n: in std_logic;
7
- clk: in std_logic;
8
- switches: in std_logic_vector (7 downto 0);
9
- leds: out std_logic_vector (7 downto 0)
10
- );
11
- end entity;
12
-
13
- library ieee;
14
- use ieee.std_logic_1164.all;
15
- use ieee.numeric_std.all;
16
-
17
- architecture rtl of fsm is
18
- signal wrap_reset_n: std_logic;
19
- signal wrap_clk: std_logic;
20
- signal wrap_switches: std_logic_vector (7 downto 0);
21
- signal wrap_leds: std_logic_vector (7 downto 0);
22
- signal state : std_logic_vector (2 downto 0);
23
- signal state_c : std_logic_vector (2 downto 0);
24
- signal n4_o : std_logic;
25
- signal n9_q : std_logic_vector (2 downto 0);
26
- signal n12_o : std_logic;
27
- signal n14_o : std_logic_vector (2 downto 0);
28
- signal n15_o : std_logic;
29
- signal n17_o : std_logic_vector (2 downto 0);
30
- signal n18_o : std_logic;
31
- signal n20_o : std_logic_vector (2 downto 0);
32
- signal n21_o : std_logic;
33
- signal n23_o : std_logic_vector (2 downto 0);
34
- signal n24_o : std_logic;
35
- signal n26_o : std_logic_vector (2 downto 0);
36
- signal n27_o : std_logic;
37
- signal n29_o : std_logic_vector (2 downto 0);
38
- signal n30_o : std_logic;
39
- signal n32_o : std_logic_vector (2 downto 0);
40
- signal n33_o : std_logic;
41
- signal n35_o : std_logic_vector (2 downto 0);
42
- signal n36_o : std_logic_vector (1 downto 0);
43
- signal n37_o : std_logic_vector (2 downto 0);
44
- signal n38_o : std_logic_vector (2 downto 0);
45
- signal n39_o : std_logic;
46
- signal n40_o : std_logic_vector (2 downto 0);
47
- signal n44_o : std_logic;
48
- signal n45_o : std_logic_vector (7 downto 0);
49
- signal n48_o : std_logic;
50
- signal n49_o : std_logic_vector (7 downto 0);
51
- signal n52_o : std_logic;
52
- signal n53_o : std_logic_vector (7 downto 0);
53
- signal n56_o : std_logic;
54
- signal n57_o : std_logic_vector (7 downto 0);
55
- signal n60_o : std_logic;
56
- signal n61_o : std_logic_vector (7 downto 0);
57
- signal n64_o : std_logic;
58
- signal n65_o : std_logic_vector (7 downto 0);
59
- signal n68_o : std_logic;
60
- signal n69_o : std_logic_vector (7 downto 0);
61
- begin
62
- wrap_reset_n <= reset_n;
63
- wrap_clk <= clk;
64
- wrap_switches <= switches;
65
- leds <= wrap_leds;
66
- wrap_leds <= n45_o;
67
- -- fsm.vhd:16:10
68
- state <= n9_q; -- (signal)
69
- -- fsm.vhd:16:16
70
- state_c <= n40_o; -- (signal)
71
- -- fsm.vhd:20:15
72
- n4_o <= not wrap_reset_n;
73
- -- fsm.vhd:22:5
74
- process (wrap_clk, n4_o)
75
- begin
76
- if n4_o = '1' then
77
- n9_q <= "000";
78
- elsif rising_edge (wrap_clk) then
79
- n9_q <= state_c;
80
- end if;
81
- end process;
82
- -- fsm.vhd:33:20
83
- n12_o <= wrap_switches (0);
84
- -- fsm.vhd:33:9
85
- n14_o <= state when n12_o = '0' else "001";
86
- -- fsm.vhd:37:20
87
- n15_o <= wrap_switches (1);
88
- -- fsm.vhd:37:9
89
- n17_o <= state when n15_o = '0' else "010";
90
- -- fsm.vhd:41:20
91
- n18_o <= wrap_switches (2);
92
- -- fsm.vhd:41:9
93
- n20_o <= state when n18_o = '0' else "011";
94
- -- fsm.vhd:45:20
95
- n21_o <= wrap_switches (3);
96
- -- fsm.vhd:45:9
97
- n23_o <= state when n21_o = '0' else "100";
98
- -- fsm.vhd:49:20
99
- n24_o <= wrap_switches (4);
100
- -- fsm.vhd:49:9
101
- n26_o <= state when n24_o = '0' else "101";
102
- -- fsm.vhd:53:20
103
- n27_o <= wrap_switches (5);
104
- -- fsm.vhd:53:9
105
- n29_o <= state when n27_o = '0' else "110";
106
- -- fsm.vhd:57:20
107
- n30_o <= wrap_switches (6);
108
- -- fsm.vhd:57:9
109
- n32_o <= state when n30_o = '0' else "111";
110
- -- fsm.vhd:61:20
111
- n33_o <= wrap_switches (7);
112
- -- fsm.vhd:61:9
113
- n35_o <= state when n33_o = '0' else "000";
114
- -- fsm.vhd:31:10
115
- n36_o <= state (1 downto 0);
116
- -- fsm.vhd:31:10
117
- with n36_o select n37_o <=
118
- n14_o when "00",
119
- n17_o when "01",
120
- n20_o when "10",
121
- n23_o when "11",
122
- "XXX" when others;
123
- -- fsm.vhd:31:10
124
- with n36_o select n38_o <=
125
- n26_o when "00",
126
- n29_o when "01",
127
- n32_o when "10",
128
- n35_o when "11",
129
- "XXX" when others;
130
- -- fsm.vhd:31:10
131
- n39_o <= state (2);
132
- -- fsm.vhd:31:10
133
- n40_o <= n37_o when n39_o = '0' else n38_o;
134
- -- fsm.vhd:71:56
135
- n44_o <= '1' when state = "000" else '0';
136
- -- fsm.vhd:71:46
137
- n45_o <= n49_o when n44_o = '0' else "00000000";
138
- -- fsm.vhd:72:56
139
- n48_o <= '1' when state = "001" else '0';
140
- -- fsm.vhd:71:60
141
- n49_o <= n53_o when n48_o = '0' else "00000001";
142
- -- fsm.vhd:73:56
143
- n52_o <= '1' when state = "010" else '0';
144
- -- fsm.vhd:72:60
145
- n53_o <= n57_o when n52_o = '0' else "00000010";
146
- -- fsm.vhd:74:56
147
- n56_o <= '1' when state = "011" else '0';
148
- -- fsm.vhd:73:60
149
- n57_o <= n61_o when n56_o = '0' else "00000011";
150
- -- fsm.vhd:75:56
151
- n60_o <= '1' when state = "100" else '0';
152
- -- fsm.vhd:74:60
153
- n61_o <= n65_o when n60_o = '0' else "00000100";
154
- -- fsm.vhd:76:56
155
- n64_o <= '1' when state = "101" else '0';
156
- -- fsm.vhd:75:60
157
- n65_o <= n69_o when n64_o = '0' else "00000101";
158
- -- fsm.vhd:77:56
159
- n68_o <= '1' when state = "110" else '0';
160
- -- fsm.vhd:76:60
161
- n69_o <= "00000111" when n68_o = '0' else "00000110";
162
- end rtl;