emmagood
Member level 4
- Joined
- Feb 13, 2010
- Messages
- 74
- Helped
- 3
- Reputation
- 6
- Reaction score
- 1
- Trophy points
- 1,288
- Activity points
- 1,849
Hello,
I am facing a strange problem with a Spartan 3 board. I am able to program the IC for combinational circuits but it is not working for sequential circuits. I tried a DFF code:
************************
entity d_ff_synchronous is
Port ( data, clock, reset : in STD_LOGIC;
q, qbar : out STD_LOGIC);
end d_ff_synchronous;
architecture Behavioral of d_ff_synchronous is
begin
process(clock)
begin
if (clock'event and clock='1') then
if (reset='0') then
q <= '0';
qbar <= '1';
else
q <= data;
qbar <= not(data);
end if;
end if;
end process;
end Behavioral;
***********************
But when I implement the same on a spatan 3 fpga, the led assigned to 'q' does not change when the data is changed via the assigned slip switch. Also, I asigned clk as per the port list with the fpga kit.
If before programming, I leave the reset switch to 0, then after programing, the output remains at 0 even when data switch is toggled. Also, if reset switch is kept at 1 and data switch is at 1, the output after programing remains at 1. (and so on)
Since this is the first time I am using the board, do I have to enable any option via xilinx (version 8.1i).
Pls let me know if anybody has faced the same problem.
Thanks,
Emma Good
I am facing a strange problem with a Spartan 3 board. I am able to program the IC for combinational circuits but it is not working for sequential circuits. I tried a DFF code:
************************
entity d_ff_synchronous is
Port ( data, clock, reset : in STD_LOGIC;
q, qbar : out STD_LOGIC);
end d_ff_synchronous;
architecture Behavioral of d_ff_synchronous is
begin
process(clock)
begin
if (clock'event and clock='1') then
if (reset='0') then
q <= '0';
qbar <= '1';
else
q <= data;
qbar <= not(data);
end if;
end if;
end process;
end Behavioral;
***********************
But when I implement the same on a spatan 3 fpga, the led assigned to 'q' does not change when the data is changed via the assigned slip switch. Also, I asigned clk as per the port list with the fpga kit.
If before programming, I leave the reset switch to 0, then after programing, the output remains at 0 even when data switch is toggled. Also, if reset switch is kept at 1 and data switch is at 1, the output after programing remains at 1. (and so on)
Since this is the first time I am using the board, do I have to enable any option via xilinx (version 8.1i).
Pls let me know if anybody has faced the same problem.
Thanks,
Emma Good