/** * Top-level module of the 4-bit register file for the Urbana board: * - slide switches 0-1 set the register connected to read port 0. * - slide switches 2-3 set the register connected to read port 1. * - slide switches 4-5 set the register to which data is written. * - slide switches 6-9 set the data at the write port. * - push button 0 asserts the write enable signal if pushed. * * - display 0 shows the id of the register connected to read port 0. * - display 1 shows the id of the register connected to read port 1. * - display 2 shows the id of the register connected to the write port. * - display 3 shows the data at the write port. * - display 6 shows the data at the first read port. * - display 7 shows the data at the second read port. * - led 0 shows the write enable signal. * * @param CLK_100MHZ clock signal. * @param BTN input bit of push button 0. * @param SW input bits of the ten slide switches. * @param LEDR output bit which drives led 0. * @param D0_SEG output bits which drive the segments of seven-segment displays 4-7. * @param D1_SEG output bits which drive the segments of seven-segment displays 0-3. * @param D0_AN anode signals for seven-segment displays 4-7. * @param D1_AN anode signals for seven-segment displays 0-3. **/ module register_file_top( input logic CLK_100MHZ, input logic [0:0] BTN, input logic [9:0] SW, output logic [0:0] LEDR, output logic [7:0] D0_SEG, output logic [7:0] D1_SEG, output logic [3:0] D0_AN, output logic [3:0] D1_AN ); logic [1:0] l_reg_read_0, l_reg_read_1; logic [1:0] l_reg_write; logic [3:0] l_port_write; logic l_write_enable; logic [3:0] l_port_read_0; logic [3:0] l_port_read_1; // TODO: finish implementation, use your display_driver for the displays endmodule