Hello Guys :)
I got a new question :p I have a 32 bit binary number, I want to put it in a register. 1. Is this possible to build a 32 Bit register ? if yes how can i do this ? 2. If no, how can I build 4 times 8Bit registers ? thx链接已复制
6 回复数
recal in yesterdays question about code and processes, you used the following,
signal cntr_devider : std_logic_vector (23 downto 0); OK, so once you decalre the signal in the form std_logic_vector you have in fact said it is (in this case) a 24 bit value. So, for your desired 32 bit binary number you would declare it as (31downto 0). Note that direction of the vector does matter. (31 downto 0) is flipped from (0 to 31) With FPGA's it is possible to build a register of almost any size you want. Hope this helps, AvatarThanks for your help
One more question, i need to build a SPI (serial programming interface) for this 32 bit register, do u have any idea how to do this ? if yes i will be very happy to help me or to write me a code ThanksHere are a couple SPI cores from opencores.org
http://www.opencores.org/projects.cgi/web/spi/overview http://www.opencores.org/projects.cgi/web/simple_spi/overviewAmirster,
The questions you've been asking seem like many I've seen in homework assignments. It's great if you're trying to teach yourself about the technology, but if you're using this forum to do your homework, we're probably doing you a disservice.