OpenCores
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
    /
    from Rev 20 to Rev 21
    Reverse comparison

Rev 20 → Rev 21

/open_hitter/trunk/bench/vhdl/search_control_wrapper.vhd
172,7 → 172,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
186,7 → 186,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
/open_hitter/trunk/rtl/vhdl/search_item.vhd
80,7 → 80,6
end search_item;
 
architecture search_item_implementation of search_item is
-- signal state : integer range 0 to 16 := 16;
signal requires_reset: std_logic := '0';
-- pxdata: out price_packet
signal store_px_type: std_logic_vector(4 downto 0) := (others => 'Z');
/open_hitter/trunk/rtl/vhdl/search_control.vhd
108,8 → 108,8
b2_id: out std_logic_vector(15 downto 0) -- unique/identifier/counter
);
end component;
signal searchitems_count : integer := 0;
signal state : integer range 0 to 16 := 16;
signal searchitems_count : integer;
signal state : integer range 0 to 16;
-- pxdata: store price_packet
signal store_px_type: std_logic_vector(4 downto 0) := (others => 'Z');
signal store_buy_sell: std_logic_vector(2 downto 0) := (others => 'Z'); -- 111 buy, 000 sell
238,9 → 238,9
store_id <= search_id_i;
--b2_px_type <= std_logic_vector'(std_logic_vector'("00000"));
state <= 10;
else
else -- nothing 10000 (avoid ZZZZZ)
-- no action - flash up Z's
order_px_type_o <= (others => 'Z');
order_px_type_o <= std_logic_vector'("10000"); -- avoiding ZZZZZ
order_buy_sell_o <= (others => 'Z'); -- 111 buy, 000 sell
order_px_o <= (others => 'Z'); -- price
order_qty_o <= (others => 'Z'); -- quantity
/open_hitter/trunk/sim/rtl_sim/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;
/open_hitter/trunk/sim/rtl_sim/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;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.