WhiteLionGus
Newbie level 1
- Joined
- Nov 20, 2013
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 16
Hi, this is my first time in the forum, so if I'm doing something wrong please let me know.
Well, my problem is that I'm building a circuit with vhdl with GAL 22v10d and everything was ok, until this part
Im sorry if the image is in spanish, but I'm from Mexico, by the way, I'm sorry for my bad english.
Anyway, I will try to explain you it in english.
Firstly, Im trying to do it with 4 bits so, (inside the red rectangle) there are (in order from left to right), a counter of 4 bits, then an adder, where the poblem begins, and a register. Well, the counter is going to count from 0 to 9, and then, the adder is going to receive the number coming (in binary code) from the counter, in other words, the register and the adder are going to be updating the sum. For those who program in c language it's like a for bucle. my problem is: how many bits must be the adder and the register?
For example, if I sum 9 with 9 I obtain 18, then, the counter works with 4 bits, and the adder obviously is going to receive 4 bits, so the adder works with four bits, but the number 18 in binary is represented like this: 10010, it hasn't 4 bits, so this is my problem, the adder has in one side 4 bits, and in the other side 7 bits because I wanna count until 99, the out is gonna work with 7 bits. How i do it? With logical gates? (in vhdl). Please help me.
Well, my problem is that I'm building a circuit with vhdl with GAL 22v10d and everything was ok, until this part
Im sorry if the image is in spanish, but I'm from Mexico, by the way, I'm sorry for my bad english.
Anyway, I will try to explain you it in english.
Firstly, Im trying to do it with 4 bits so, (inside the red rectangle) there are (in order from left to right), a counter of 4 bits, then an adder, where the poblem begins, and a register. Well, the counter is going to count from 0 to 9, and then, the adder is going to receive the number coming (in binary code) from the counter, in other words, the register and the adder are going to be updating the sum. For those who program in c language it's like a for bucle. my problem is: how many bits must be the adder and the register?
For example, if I sum 9 with 9 I obtain 18, then, the counter works with 4 bits, and the adder obviously is going to receive 4 bits, so the adder works with four bits, but the number 18 in binary is represented like this: 10010, it hasn't 4 bits, so this is my problem, the adder has in one side 4 bits, and in the other side 7 bits because I wanna count until 99, the out is gonna work with 7 bits. How i do it? With logical gates? (in vhdl). Please help me.