Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Unable to run clock based circuits on spartan 3 fpga kit

Status
Not open for further replies.

emmagood

Member level 4
Joined
Feb 13, 2010
Messages
72
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
1,825
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
 

How are you driving the clock? An unconnected/undriven clock might explain the behaviour.
Did you intend a synchronous reset?
 

OK...... the board has two sockets for 4 pin xtals. One socket has a 25 Mhz 4 pin crystal where as the other is empty. Also, in Xilinx software, in the pin assignment option, I am assigning the pin to clock as per the board manufacturers datasheet (p79 or something like that). And yes, I am intending to implement a basic synchronous d ff. Hope the above code is correct.

Also, thanks for the reply :)

Emma.

- - - Updated - - -

OK...... the board has two sockets for 4 pin xtals. One socket has a 25 Mhz 4 pin crystal where as the other is empty. Also, in Xilinx software, in the pin assignment option, I am assigning the pin to clock as per the board manufacturers datasheet (p79 or something like that). And yes, I am intending to implement a basic synchronous d ff. Hope the above code is correct.

Also, thanks for the reply :)

Emma.
 

OK the problem was solved. For XT1 port the clock 2 port pin (in this board p180) had to be used.

Thanks.
Emma.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top