Re: SBC/FPGA

Ed Casas (edc@ece.ubc.ca) Sun, 27 Feb 2000 17:11:20 -0800


Date: Sun, 27 Feb 2000 17:11:20 -0800
From: Ed Casas <edc@ece.ubc.ca>
Subject: Re: SBC/FPGA

On Sun, Feb 27, 2000 at 11:26:15AM -0800, Shawn O'Neill wrote: > Hello, > > I have a general quetion regarding the hardware in the lab. > > For Lab#3 we dowloaded our machine code to the SBC and the VHDL code to the > FPGA to count up or down from 0 to 9. If you just dowloaded the assembly > code to the SBC and ran it without programming the FPGA you would get an > infinte loop outputting an asterix mark. Can you figure out why this is the case? > Now once you programmed the FPGA you could go back to the > hyperterminal and see the numbers count up or down and the > program would stop after printing the number 9. You mean it would start printing asterisks. > The question is: Why do you have to reprogram the FPGA every > time the your assembly language code ends???? You don't, the FPGA continues to count up or down. > With my code (and a few others I have seen) if you try to run your assembly > code again at this point (ie. after running the program successfully once) > it doesn't recognize any port input signal and starts the infinite loop of > asterixes again. When your counter counts past 9 what values will be in the register? What will you program print for these values? > So to get your program to work properly you have to use > this sequence of events avery time you want valid output: > > 1. dl machine code to SBC > 2. run machine code -- starts infinte loop > 3. program FPGA > 4. return to hyperterminal to see valid output > > Why can't it just be: > > 1. dl machine code to SBC > 2. program FPGA > 3. run the machine code whenever you want and you get valid output as long > as the board is not reset or power is not turned off. This is exactly what happens. If you had waited 246 seconds after the program started printing asterisks you would have seen it start printing numbers again. Can you figure out why? -- Ed Casas edc@ece.ubc.ca http://casas.ece.ubc.ca +1 604 822-2592