URL
https://opencores.org/ocsvn/open_hitter/open_hitter/trunk
Subversion Repositories open_hitter
Compare Revisions
- This comparison shows the changes necessary to convert path
/open_hitter/trunk/sim/rtl_sim
- from Rev 20 to Rev 21
- ↔ Reverse comparison
Rev 20 → Rev 21
/src/hitter_sim.vhd
118,8 → 118,8
flasher: process (RX_CLK) is |
begin |
if rising_edge(RX_CLK) then |
if (pos < 4) then -- ghdl flash |
-- if (pos < 62500000) then -- 125Mhz timing / 0.5s |
-- if (pos < 4) then -- ghdl flash |
if (pos < 62500000) then -- 125Mhz timing / 0.5s |
pos <= pos + 1; |
else |
alight <= not alight; |
/src/search_control_sim.vhd
175,7 → 175,7
type input_pattern_array is array (natural range <>) of input_pattern_type; |
constant input_patterns : input_pattern_array := |
( ('1', std_logic_vector'("00000"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec), -- 0 reset |
('1', std_logic_vector'("ZZZZZ"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec), -- 1 nothing |
('1', std_logic_vector'("10000"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec), -- 1 nothing |
('1', std_logic_vector'("00110"), std_logic_vector'("000"), test_px, set_qty, test_sec0), -- 2 sec/set |
('1', std_logic_vector'("00110"), std_logic_vector'("000"), test_px, set_qty, test_sec1), -- 3 sec/set |
('1', std_logic_vector'("00110"), std_logic_vector'("000"), test_px, set_qty, test_sec1), -- 4 sec/set - repeat |
189,7 → 189,7
type output_pattern_array is array (natural range <>) of output_pattern_type; |
constant output_patterns : output_pattern_array := |
( (std_logic_vector'("00000"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec, zz_id), -- 0 reset |
(std_logic_vector'("ZZZZZ"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec, zz_id), -- 1 nothing |
(std_logic_vector'("10000"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec, zz_id), -- 1 nothing |
(std_logic_vector'("01010"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec, std_logic_vector'(X"0000")), -- 2 sec/set |
(std_logic_vector'("01010"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec, std_logic_vector'(X"0001")), -- 3 sec/set |
(std_logic_vector'("00110"), std_logic_vector'("ZZZ"), zz_px, zz_qty, zz_sec, std_logic_vector'(X"0001")), -- 4 sec/set |
216,17 → 216,17
result_all_ok <= '0'; |
result_one <= '0'; |
result_two <= '0'; |
processing <= '0'; |
end if; |
processing <= '1'; |
else |
|
-- Pattern step |
if i < input_patterns'right+1 then |
-- Pattern step |
if i < input_patterns'right+1 then |
-- diagnostics (uncomment) |
-- write (l, String'("Wrapper start loop i: ")); |
-- write (l, i); |
-- writeline (output, l); |
|
processing <= '1'; |
-- processing <= '1'; |
|
if subcount = 0 then |
-- Set the inputs. |
255,32 → 255,57
-- got a return .. check it |
if order_px_valid_o = '1' then |
|
if order_px_type_o /= output_patterns(i).order_px_type_o |
or order_buy_sell_o /= output_patterns(i).order_buy_sell_o |
or order_px_o /= output_patterns(i).order_px_o |
or order_qty_o /= output_patterns(i).order_qty_o |
or order_sec_o /= output_patterns(i).order_sec_o |
or order_id_o /= output_patterns(i).order_id_o then |
-- result_one <= '1'; |
|
if i = 1 then |
if order_px_type_o = output_patterns(i).order_px_type_o then |
result_one <= '1'; |
end if; |
end if; |
|
if i = 2 then |
if order_px_type_o = output_patterns(i).order_px_type_o then |
result_two <= '1'; |
end if; |
end if; |
|
if i = 3 then |
if order_px_type_o = output_patterns(i).order_px_type_o then |
result_all_ok <= '1'; |
end if; |
end if; |
|
|
-- if order_px_type_o /= output_patterns(i).order_px_type_o |
-- or order_buy_sell_o /= output_patterns(i).order_buy_sell_o |
-- or order_px_o /= output_patterns(i).order_px_o |
-- or order_qty_o /= output_patterns(i).order_qty_o then |
-- or order_sec_o /= output_patterns(i).order_sec_o |
-- or order_id_o /= output_patterns(i).order_id_o then |
-- |
res_ok := '0'; |
end if; |
|
-- res_ok := '0'; |
-- else |
-- result_all_ok <= '1'; |
-- end if; |
|
res := res + 1; |
end if; |
|
if subcount = 4 then |
if subcount = 6 then |
-- check result |
if res /= 1 then |
res_ok := '0'; |
end if; |
-- if res /= 1 then |
-- res_ok := '0'; |
-- end if; |
|
-- reporting |
if i = 11 then |
result_all_ok <= res_ok; -- success! |
elsif i = 6 then |
result_two <= res_ok; -- loader tasks oka |
elsif i = 0 then |
result_one <= res_ok; -- initial reset worked |
end if; |
-- if i = 11 then |
-- result_all_ok <= res_ok; -- success! |
-- elsif i = 6 then |
-- result_two <= res_ok; -- loader tasks oka |
-- elsif i = 0 then |
-- result_one <= res_ok; -- initial reset worked |
-- end if; |
|
-- next pattern |
i := i + 1; |
293,7 → 318,7
-- not processing (done or not started) |
processing <= '0'; |
end if; -- i |
|
end if; |
end if; -- RX_CLK |
end process; |
end behav; |