Line 106... |
Line 106... |
b2_sec: out std_logic_vector(55 downto 0); -- 7x 8bits securities identifier
|
b2_sec: out std_logic_vector(55 downto 0); -- 7x 8bits securities identifier
|
b2_id: out std_logic_vector(15 downto 0) -- unique/identifier/counter
|
b2_id: out std_logic_vector(15 downto 0) -- unique/identifier/counter
|
);
|
);
|
end component;
|
end component;
|
-- for search_item_0: search_item use entity work.search_item;
|
-- for search_item_0: search_item use entity work.search_item;
|
|
signal searchitems_count : integer := 0;
|
--
|
--
|
signal state : integer range 0 to 16 := 16;
|
signal state : integer range 0 to 16 := 16;
|
-- pxdata: store price_packet
|
-- pxdata: store price_packet
|
signal store_px_type: std_logic_vector(4 downto 0) := (others => '0');
|
signal store_px_type: std_logic_vector(4 downto 0) := (others => '0');
|
signal store_buy_sell: std_logic_vector(2 downto 0) := (others => '0'); -- 111 buy, 000 sell
|
signal store_buy_sell: std_logic_vector(2 downto 0) := (others => '0'); -- 111 buy, 000 sell
|
Line 151... |
Line 152... |
if rising_edge(RX_CLK) then
|
if rising_edge(RX_CLK) then
|
if search_px_valid_i = '1' then
|
if search_px_valid_i = '1' then
|
|
|
if search_px_type_i = std_logic_vector'("00000") then
|
if search_px_type_i = std_logic_vector'("00000") then
|
-- do reset store and outputs
|
-- do reset store and outputs
|
store_px_type <= (others => '0');
|
order_px_type_o <= (others => 'Z');
|
store_buy_sell <= (others => '0'); -- 111 buy, 000 sell
|
order_buy_sell_o <= (others => 'Z'); -- 111 buy, 000 sell
|
store_px <= (others => '0'); -- price
|
order_px_o <= (others => 'Z'); -- price
|
store_qty <= (others => '0'); -- quantity
|
order_qty_o <= (others => 'Z'); -- quantity
|
store_sec <= (others => '0'); -- 7x 8bits securities identifier
|
order_sec_o <= (others => 'Z'); -- 7x 8bits securities identifier
|
-- not reset / generic store_id <= (others => '0'); -- unique/identifier/counter
|
order_px_valid_o <= '1';
|
--
|
--
|
b2_px_type <= (others => 'Z');
|
b1_px_type <= (others => '0');
|
b2_buy_sell <= (others => 'Z'); -- 111 buy, 000 sell
|
b1_buy_sell <= (others => '0'); -- 111 buy, 000 sell
|
b2_px <= (others => 'Z'); -- price
|
b1_px <= (others => '0'); -- price
|
b2_qty <= (others => 'Z'); -- quantity
|
b1_qty <= (others => '0'); -- quantity
|
b2_sec <= (others => 'Z'); -- 7x 8bits securities identifier
|
b1_sec <= (others => '0'); -- 7x 8bits securities identifier
|
b2_id <= (others => 'Z'); -- unique/identifier/counter
|
-- b1_id <= (others => '0'); -- unique/identifier/counter
|
|
b1_px_valid <= '1';
|
--
|
--
|
b2_px_type <= std_logic_vector'(std_logic_vector'("00000"));
|
searchitems_count <= 0;
|
state <= 8;
|
state <= 8;
|
|
|
elsif search_px_type_i = std_logic_vector'("00110") then
|
elsif search_px_type_i = std_logic_vector'("00110") then
|
-- do set store from incoming price
|
-- do set store from incoming price
|
store_px_type <= b1_px_type;
|
store_px_type <= b1_px_type;
|
Line 236... |
Line 238... |
|
|
when 8 =>
|
when 8 =>
|
-- correct store_item but there was no match
|
-- correct store_item but there was no match
|
b2_px_type <= std_logic_vector'("ZZZZZ");
|
b2_px_type <= std_logic_vector'("ZZZZZ");
|
state <= 16;
|
state <= 16;
|
|
order_px_valid_o <= '0';
|
|
|
when others => null;
|
when others => null;
|
end case; -- state
|
end case; -- state
|
|
|
if (state < 16) then
|
if (state < 16) then
|