dorddor
Newbie
- Joined
- Dec 23, 2012
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,314
hi all,
i got a vhdl assignment and im stuck.
i need to create a controller and data path that have 4 numbers as inputs (as well as clk and reset) and i need to arrange them from the smallest to the largest (4 outputs).
i also have 1 comparator that i can use as component inside the data path (i can use only one). the comparator have 2 inputs (2 numbers) and 2 outputs (smaller number and larger number).
the controller is a component inside the data path and i can program it however i want (need to have the same clk and reset as the data path as inputs, among other inputs and outputs as we like).
the contoller have a state machine, i think that the state machine has 5 or 6 states, lets say if the inputs are (A B C D) so it will compare AB and place the bigger as new A and smaller as new B, the same for CD, thats 2 states, then compare the new AC and replace larger and smaller, the same for BD, and the 5 state will be comparison of the new BC, maybe we need another state, im not sure. (thats my idea, so fell free to advice for other state machines if u got )
in the datapath, we can use 1 comparator, 1 controller (both as components), and whatever else we want to add, but not as components.
i hope that im clear, and really need some help, cuz im stuck, thanks alot
i got a vhdl assignment and im stuck.
i need to create a controller and data path that have 4 numbers as inputs (as well as clk and reset) and i need to arrange them from the smallest to the largest (4 outputs).
i also have 1 comparator that i can use as component inside the data path (i can use only one). the comparator have 2 inputs (2 numbers) and 2 outputs (smaller number and larger number).
the controller is a component inside the data path and i can program it however i want (need to have the same clk and reset as the data path as inputs, among other inputs and outputs as we like).
the contoller have a state machine, i think that the state machine has 5 or 6 states, lets say if the inputs are (A B C D) so it will compare AB and place the bigger as new A and smaller as new B, the same for CD, thats 2 states, then compare the new AC and replace larger and smaller, the same for BD, and the 5 state will be comparison of the new BC, maybe we need another state, im not sure. (thats my idea, so fell free to advice for other state machines if u got )
in the datapath, we can use 1 comparator, 1 controller (both as components), and whatever else we want to add, but not as components.
i hope that im clear, and really need some help, cuz im stuck, thanks alot