Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop VHDL for the following MIPS components. You should define an architecture for each of the entities given below. You should test each entity by

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Develop VHDL for the following MIPS components. You should define an architecture for each of the entities given below. You should test each entity by developing simulation files for the entity. Your architecture should implement the functionality described in the text for each entity. To make the simulation results more readable, we will use a 32-bit datapath (both addr and data buses). You should use the types from the dlx_types package you used in lab2, and the functions from bv_arithmetic as needed. The propagation delay through each unit should be 5 nanoseconds. 32-bit register . This will be used for the PC, NPC, A,B,Imm, ALUoutput, LMD, and IR registers. See Figure C.17 in textbook entity dlx_register is port(in_val: in dlx_word; clock: in bit; out_val: out dlx_word); end entity dlx_register; The register should be sensitive to all inputs. If clock is one, the value present at in_val should be copied to out_val .When clock goes to zero, the output value is frozen until clock goes high again. 32-bit Two-way multiplexer Selects one of two thirty-two bit inputs based on whether the select bit is one or zero. This has no state; it is purely combinational logic. entity mux is port (input_1, input_0 : in dlx_word; which: in bit; output: out dlx_word); end entity mux; Sign extender Takes a 16-bit input, produces a 32-bit output whose lower 16 bits are the same as the input, and whose upper 16 bits are copies of the (sign) bit from the input. This is combinational logic and has no internal state or variables. entity sign_extend is port (input: in half_word; output: out dlx_word); end entity sign_extend; PC incrementer Adds 4 to its 32-bit input. Used to increment PC to create the value to put in NPC. An overflow is not indicated, you just wrap the address back around to zero (arithmetic mod 2**32). This is combinational logic and has no internal state. entity add4 is port (input: in dlx_word; output: out dlx_word); end entity add4; Register File This is a dual-ported register file for reads, single ported for writes. It has a clock input that behaves just like the clock input on the single register defined above Additionally it takes two 5-bit inputs regA and regB, each of which gives the address of the register whose 32-bit value is to be sent to the corresponding output port of the register file. There is a one-bit input Read_notwrite, that is set to a one do a read, a zero to do a write. Use the regA input as the number of the register to which the value in data_in is to be written for a write operation (read_notwrite = '0'). entity regfile is port (read_notwrite,clock : in bit; rega, rebB: in register_index; data_in: in dlx_word; dataA_out, dataB_out: out dlx_word ); end entity regfile; Develop VHDL for the following MIPS components. You should define an architecture for each of the entities given below. You should test each entity by developing simulation files for the entity. Your architecture should implement the functionality described in the text for each entity. To make the simulation results more readable, we will use a 32-bit datapath (both addr and data buses). You should use the types from the dlx_types package you used in lab2, and the functions from bv_arithmetic as needed. The propagation delay through each unit should be 5 nanoseconds. 32-bit register . This will be used for the PC, NPC, A,B,Imm, ALUoutput, LMD, and IR registers. See Figure C.17 in textbook entity dlx_register is port(in_val: in dlx_word; clock: in bit; out_val: out dlx_word); end entity dlx_register; The register should be sensitive to all inputs. If clock is one, the value present at in_val should be copied to out_val .When clock goes to zero, the output value is frozen until clock goes high again. 32-bit Two-way multiplexer Selects one of two thirty-two bit inputs based on whether the select bit is one or zero. This has no state; it is purely combinational logic. entity mux is port (input_1, input_0 : in dlx_word; which: in bit; output: out dlx_word); end entity mux; Sign extender Takes a 16-bit input, produces a 32-bit output whose lower 16 bits are the same as the input, and whose upper 16 bits are copies of the (sign) bit from the input. This is combinational logic and has no internal state or variables. entity sign_extend is port (input: in half_word; output: out dlx_word); end entity sign_extend; PC incrementer Adds 4 to its 32-bit input. Used to increment PC to create the value to put in NPC. An overflow is not indicated, you just wrap the address back around to zero (arithmetic mod 2**32). This is combinational logic and has no internal state. entity add4 is port (input: in dlx_word; output: out dlx_word); end entity add4; Register File This is a dual-ported register file for reads, single ported for writes. It has a clock input that behaves just like the clock input on the single register defined above Additionally it takes two 5-bit inputs regA and regB, each of which gives the address of the register whose 32-bit value is to be sent to the corresponding output port of the register file. There is a one-bit input Read_notwrite, that is set to a one do a read, a zero to do a write. Use the regA input as the number of the register to which the value in data_in is to be written for a write operation (read_notwrite = '0'). entity regfile is port (read_notwrite,clock : in bit; rega, rebB: in register_index; data_in: in dlx_word; dataA_out, dataB_out: out dlx_word ); end entity regfile

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

How does selection differ from recruitment ?

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago