vertigo_vhdl 0.8.6 → 0.8.11

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 +39 -18
  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: 67916f8023b4daaaa9e3b2ee7405a880bbcd71ad70733b087ec4e0d1f63ccc2d
4
- data.tar.gz: df9ae80fb38ea82afbfa7bc79d128448dc979342770a28493061463cae623d3e
3
+ metadata.gz: 5f66142ff1aa2f02093dbc99c8cd22a78a44ae177d0ecaf41e1cc3289b505e80
4
+ data.tar.gz: 406108f6e1fc88d54cd96b38708772e7051788b8c9ab9417a15bef96326004e1
5
5
  SHA512:
6
- metadata.gz: a13be7a1c2bfdd4ed210bceab2231700f409f1e1b274073631629bf20909298fe0989a2485a14b269ecfb5058c6c3df37a31ba9f880a8e7a7fd261e3b0524475
7
- data.tar.gz: ec0ae03dfae2b65a5a7f7a03aacc80e43cac31517d20ec0668b0e7542894ca4335f6273f62aacfc4fa68fef3e2c3d4983c1dd716f2857212715112b73ae93e90
6
+ metadata.gz: 9c3f59eea1d1a2ca3ec6c22361bcd5eb54512b95a9b76e60465d6aa2749072d730fc0d79d28cfe0b2d11048f49a29f655d55aabc34cf6f0c8fcbd0c82b3f440c
7
+ data.tar.gz: a12214d7979e71a31172ce35fa67ac7ca3bbf69c4a3e8730acdeae20c451cb9344b3a2c1d567389db41ffa699a896db6244f8ec3fdd4f9d15600d9caf7ef857e
@@ -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
@@ -1,23 +1,31 @@
1
1
  module Vertigo
2
2
 
3
3
  class TestBenchGenerator
4
+
4
5
  attr_accessor :ast
5
6
  attr_accessor :entity,:arch
6
7
  attr_accessor :clk,:rst
8
+ attr_accessor :options
9
+
7
10
  def initialize options={}
8
11
  @options=options
9
12
  @supplemental_libs_h=options[:supplemental_libs_h]||{}
10
13
  end
11
14
 
12
15
  def generate_from ast
13
- @ast=ast
14
- entity_arch=find_entity_arch()
15
- detecting_clk_and_reset(entity_arch)
16
- vhdl_tb=gen_code()
17
- @tb_name=@entity_name+"_tb"
18
- tb_filename=@tb_name+".vhd"
19
- File.open(tb_filename,'w'){|f| f.puts vhdl_tb}
20
- puts "=> generated testbench : #{tb_filename}"
16
+ begin
17
+ @ast=ast
18
+ entity_arch=find_entity_arch()
19
+ detecting_clk_and_reset(entity_arch)
20
+ vhdl_tb=gen_code()
21
+ @tb_name=@entity_name+"_tb"
22
+ tb_filename=@tb_name+".vhd"
23
+ File.open(tb_filename,'w'){|f| f.puts vhdl_tb}
24
+ puts "=> generated testbench : #{tb_filename}" unless options[:mute]
25
+ return tb_filename
26
+ rescue Exception => e
27
+ puts e.backtrace
28
+ end
21
29
  end
22
30
 
23
31
  def line n=80
@@ -109,7 +117,9 @@ module Vertigo
109
117
  code << line
110
118
  code << comment("Design Under Test")
111
119
  code << line
112
- code << "dut : entity work.#{@entity_name}(#{@arch_name})"
120
+ str="dut : entity work.#{@entity_name}"
121
+ str+="(#{@arch_name})" if @arch_name
122
+ code << str
113
123
  code.indent=2
114
124
  code << "port map ("
115
125
  code.indent=4
@@ -141,7 +151,7 @@ module Vertigo
141
151
  code << "report \"waiting for asynchronous reset\";"
142
152
  code << "wait until #{@reset_name}='1';"
143
153
  code << "wait_cycles(10);"
144
- code << "wait_cycles(10);"
154
+ code << "wait_cycles(200);"
145
155
  code << "report \"end of simulation\";"
146
156
  code << "running <= false;"
147
157
  code << "wait;"
@@ -157,28 +167,39 @@ module Vertigo
157
167
  puts msg="ERROR : no entity found"
158
168
  raise msg
159
169
  end
160
- puts "=> found entity '#{entity.name.str}'"
170
+ puts "=> found entity '#{entity.name.str}'" unless options[:mute]
161
171
  @arch=ast.design_units.find{|du| du.is_a? Architecture}
162
172
  if @arch.nil?
163
- puts msg="ERROR : no architecture found"
164
- raise msg
173
+ puts msg="WARNING : no architecture found"
174
+ else
175
+ puts "=> found architecture '#{arch.name.str}'" unless options[:mute]
165
176
  end
166
177
 
167
- puts "=> found architecture '#{arch.name.str}'"
168
178
  @entity_name=@entity.name.str
169
- @arch_name=@arch.name.str
179
+ @arch_name=@arch.name.str if @arch
170
180
  [@entity,@arch]
171
181
  end
172
182
 
173
183
  def detecting_clk_and_reset entity_arch
174
- puts "=> detecting clock and reset"
184
+ puts "=> detecting clock and reset" unless options[:mute]
175
185
  entity,arch=entity_arch
176
186
  inputs=entity.ports.select{|port| port.is_a?(Input)}
177
187
  @clk = inputs.sort_by{|input| levenshtein_distance(input.name.str,"clk")}.first
178
188
  @rst = inputs.sort_by{|input| levenshtein_distance(input.name.str,"reset_n")}.first
179
- puts "\t-most probable clk : #{@clk.name.str}"
180
- puts "\t-most probable reset : #{@rst.name.str}"
189
+ puts "\t-most probable clk : #{@clk.name.str}" unless options[:mute]
190
+ puts "\t-most probable reset : #{@rst.name.str}" unless options[:mute]
191
+
181
192
  @max_length_str=entity.ports.map{|port| port.name.str.size}.max
193
+
194
+ print "\t-validate [Y/n] ? "
195
+ answer=$stdin.gets.chomp
196
+ if answer=="n"
197
+ puts "ok, switching to 'clk' and 'reset_n'"
198
+ @reset_name="reset_n"
199
+ @clk_name="clk"
200
+ @excluded=[]
201
+ return
202
+ end
182
203
  @excluded=[@clk,@rst]
183
204
  @reset_name=@rst.name.str
184
205
  @clk_name=@clk.name.str
@@ -1,3 +1,3 @@
1
1
  module Vertigo
2
- VERSION="0.8.6"
2
+ VERSION="0.8.11"
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.6
4
+ version: 0.8.11
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-03-23 00:00:00.000000000 Z
11
+ date: 2021-11-02 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;
@@ -1,64 +0,0 @@
1
- architecture rtl of entite is
2
- begin
3
-
4
- comb: process(state_r,inputs_r,inputs_acks_r,vars_r,outputs_acks_r)
5
- variable state_v : state_t;
6
- variable vars_v : vars_t;
7
- variable outputs_v : outputs_t;
8
- begin
9
- state_v := state_r;
10
- case state_v is
11
- when S_0 =>
12
- req_c.a := '1';
13
- state_v := S_1;
14
- when S_1 =>
15
- vars_c.tmp_0 := ack_c.a = '1';
16
- vars_v.va := inputs_v.a;
17
- if tmp_0 then
18
- req_c.a := '0';
19
- req_c.b := '1';
20
- state_v := S_2;
21
- else
22
- null;
23
- end if;
24
- when S_2 =>
25
- vars_c.tmp_1 := ack_c.b = '1';
26
- vars_v.vb := inputs_v.b;
27
- if tmp_1 then
28
- req_c.b := '0';
29
- state_v := S_3;
30
- else
31
- null;
32
- end if;
33
- when S_3 =>
34
- if va /= vb then
35
- vars_c.tmp_2 := va > vb;
36
- if tmp_2 then
37
- vars_c.va := vb;
38
- state_v := S_3;
39
- else
40
- null;
41
- end if;
42
- else
43
- null;
44
- end if;
45
- when S_4 =>
46
- vars_c.tmp_3 := ack_c.result = '1';
47
- null;
48
- if tmp_3 then
49
- req_c.result := '0';
50
- null;
51
- else
52
- null;
53
- end if;
54
- when others =>
55
- null;
56
- end case;
57
- vars_c <= vars_v;
58
- inputs_reqs_c <= inputs_reqs_v;
59
- outputs_c <= outputs_v;
60
- outputs_reqs_c <= outputs_reqs_v;
61
- state_c <= state_v;
62
- end process;
63
-
64
- end rtl;
@@ -1,34 +0,0 @@
1
- -- generated automatically by NewageHLS
2
- library ieee;
3
- use ieee.std_logic_1164.all;
4
- use ieee.numeric_std.all;
5
-
6
- library newage_lib;
7
- use newage_lib.type_package.all;
8
-
9
-
10
- entity PingPong_sys is
11
- port(
12
- reset_n : in std_logic;
13
- clk : in std_logic;
14
- sreset : in std_logic;
15
- go : in std_logic;
16
- done : out std_logic;
17
- inputs : in inputs_t;
18
- outputs : out outputs_t;
19
- reqs : out reqs_t;
20
- acks : in acks_t);
21
- end entity PingPong_sys;
22
-
23
- architecture RTL of PingPong_sys is
24
- begin
25
-
26
- inst_0 : entity Player1_lib.ping(RTL)
27
- port map(
28
- );
29
-
30
- inst_1 : entity Player2_lib.pong(RTL)
31
- port map(
32
- );
33
-
34
- end RTL;