- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on a 32-bit adder with the following inputs and outputs:
input [31:0] a;
input [31:0] b;
output Cout;
output [31:0] sum;
However, my DE0 Nano SoC board only has 40 GPIO pins, and I require a total of 97 pins for this design.
What should I do to overcome the shortage of GPIO pins?
Thank you in advance for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to use internal register(s) to store the values in A, B, and/or SUM.
If you do that, you could load the input A, B registers with just two or three signals (CLOCK plus one or two DATA inputs).
Serial shift in the data inputs using 32 (or 64) clocks on the DATA line(s).
So just two or three pins.
Then you have 33 outputs needed for SUM plus COUT.
Total of 3 + 33 = 36 signals total, less than 40 with some spares...
And if you want even fewer, you could store the SUM/COUT in a register and shift it out serially also.
With a LOAD/SHIFT line, a CLOCK line, and a DATAOUT line just three lines needed.
So if you want to really minimize I/O you could do it in 3+3=6 lines (or even 3+2=5 lines with a shared CLOCK line).
OR
If you don't want to do serial shifting, you could define a 32b bus that is input/output.
And then have a CLOCK and 3 MODE bits that say what is on the 32b bus.
For example:
MODE | FUNCTION | I/Obus |
0 | load A on clock | input |
1 | load B on clock | input |
2 | display A | output |
3 | display B | output |
4 | display A+B | output |
So this would require 32 (or 33 for COUT) data bits and 4 control bits, for a total of 37 GPIOs.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to use internal register(s) to store the values in A, B, and/or SUM.
If you do that, you could load the input A, B registers with just two or three signals (CLOCK plus one or two DATA inputs).
Serial shift in the data inputs using 32 (or 64) clocks on the DATA line(s).
So just two or three pins.
Then you have 33 outputs needed for SUM plus COUT.
Total of 3 + 33 = 36 signals total, less than 40 with some spares...
And if you want even fewer, you could store the SUM/COUT in a register and shift it out serially also.
With a LOAD/SHIFT line, a CLOCK line, and a DATAOUT line just three lines needed.
So if you want to really minimize I/O you could do it in 3+3=6 lines (or even 3+2=5 lines with a shared CLOCK line).
OR
If you don't want to do serial shifting, you could define a 32b bus that is input/output.
And then have a CLOCK and 3 MODE bits that say what is on the 32b bus.
For example:
MODE | FUNCTION | I/Obus |
0 | load A on clock | input |
1 | load B on clock | input |
2 | display A | output |
3 | display B | output |
4 | display A+B | output |
So this would require 32 (or 33 for COUT) data bits and 4 control bits, for a total of 37 GPIOs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me know if you are able to work on previous suggestion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com/’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.
p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution, give Kudos and rate 5/5 survey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page