I am running a simple picoblaze code where I am using two addresses and sending a high strobe on both the addresses, the assembly code has no loop, so technically my code should run ONLY once but the high signal on the addresses that I am using is coming continuously. I used an oscilloscope to check the output. I am posting the Glue Logic and the pico code. I am using a Spartan3 Xc3s1000-4fg456 fpga board.
Anyone here has any idea what I am doing wrong here? Here is the pico code
;**************************************************************************************
; OUT Port definition
;**************************************************************************************
CONSTANT sx1, 16
CONSTANT sx2, 20
;**************************************************************************************
; Special Register usage
;***********************************************************************************
NAMEREG SE, TEMP1
NAMEREG SD, TEMP2
OUTPUT TEMP1, sx1
OUTPUT TEMP2, sx2
And the vhdl code for the glue logic is
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity Glue_Logic is
PORT (
CLK :IN STD_LOGIC;
RESET :IN STD_LOGIC;
DATA_IN_P :IN STD_LOGIC_VECTOR(7 DOWNTO 0);
PORT_ADDR :IN STD_LOGIC_VECTOR(7 DOWNTO 0);
PORT_OUT1 :OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
PORT_OUT2 :OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
);
end Glue_Logic;
architecture Behavioral of Glue_Logic is
signal port_out1_s :STD_LOGIC_VECTOR (7 downto 0);
signal port_out2_s :STD_LOGIC_VECTOR (7 downto 0);
begin
PORT_OUT1 <= port_out1_s;
PORT_OUT2 <= port_out2_s;
process(reset, clk)
begin
if (reset = '1') then
port_out1_s <= (others => '0');
port_out2_s <= (others => '0');
elsif (clk'event and clk = '1') then
case (port_addr) is
when x"16" =>
port_out2_s <= x"01";
when x"20" =>
port_out1_s <= x"01";
when others =>
port_out1_s <= (others => '0');
port_out2_s <= (others => '0');
end case;
end if;
end process;
end Behavioral;