hey guys, I'm almost finishing up my processor but I'm a bit stuck on the register file; below is the description of what it is supposed to do:
Code:
Build a register file that contains 8 8-bit registers. Has inputs and outputs as defined below.
Name Width Input/Output
a_sel 3 I selects the register whose contents are to be placed on A
b_sel 3 I selects the register whose contents are to be placed on B
r0_w 1 I stores the value on RES into reg 0
r1_w 1 I stores the value on RES into reg 1
r2_w 1 I stores the value on RES into reg 2
r3_w 1 I stores the value on RES into reg 3
r4_w 1 I stores the value on RES into reg 4
r5_w 1 I stores the value on RES into reg 5
r6_w 1 I stores the value on RES into reg 6
r7_w 1 I stores the value on RES into reg 7
RES 8 I input RES bus
A 8 O output A bus
B 8 O output B bus
BTW I'm usingl VHDL or Assembly, I'm just building this on the "gate and wire" level using tkgate.
So far I've build all 8 8bit registers. Then I build two 8 to 1 multiplexers that take all the wires from the registers (meaning 64bits go into the MUX). I send a_sel to one of the MUXes and b_sel to the other. The problem is that when in the MUX I'm ANDing a 3 bit wire (select) with an 8 bit wire it gives me a bunch of errors....any ideas?
thanks