- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ? thxLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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, Avatar- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks 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 Thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not, but you should be able to find this either somewhere else in here or in the NIOS Forum or in the MegaWizard IP secion of the tools.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here 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/overview- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Amirster,
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey :)
I am not doing my homework :) I am just learning this code for me, and for my knowledge. I just finish my B.sc in computer science and I am studing VHDL for more knowledge.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page