Picoblaze, UART: need help!!

Mar 31, 2006 1 Replies

Thanks so much to all who replied to my previous messages I appreciate your concern.



Please help me on this.



I have written the code for my encoder below. It is synthesizable and has no errors.



What i want to do is after programming the FPGA(Spartan3 starter kit), I want to check the results from the harware.



Means using LEDs for 3 bit output and switch for the input.



My code also contains the clock signal.



IF i lock one switch to Clock and then toggle it's not working and i think it won't.



I want to test this code on hardware.



Some one suggested Using Picoblaze, RS232,UART connection.



I really have no clue of how to do it.



Where to get picoblaze, how to program it to take input from RS232, where to get UART models. And how will i be writing the text in hyperterminal to send the data through this port.Will i be actually toggling the switch which i have locked for input.



I badly need help on this.



thanks and regards



Code:



module encoder(outp,clk,res,inp); input clk,res,inp; outp[2:0] outp; reg [4:0]ff;



always@(posedge clk) begin



if(res) ff[4:0]


preet schrieb:

errors.

This is good, but does not prove too much.

to check the results from the harware.

This might be a nice test (or better call it play around), but a simulation is much better and does show much more. So your "test" isn't a real test, it has no practical relevance.

won't.

You can't use a normal switch to supply a clock to a digital circuit, especially not a modern FPGA. The switch WILL bounce and produce multiple pulses. A debouncing is necessary, either by hardware (RC-filter + schmitt trigger) or software (logic inside the FPGA)

Looks like you just starting to get into the digital/FPGA business. Start small. Get a simpler circuit thant a Viterby decoder. Get a feeling for simulation and testing in hardware, understand the difference and the idea behind the different ways of testing. For instance, build a simple 4 bit counter. Do a clean simulation. Implement it in hardware. Test it in hardware (use a switch debouncer). Then go on to the Viterby.

Picoblaze can be found on the Xilinx website, look for xapp213.

I think you need to understand some basic concepts first.

Regards Falk

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required