





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






CS/EE 3710
z $0 is hardwired to the value 0
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
Cycle 1: f1 = 1 + (-1) = 0, f2 = 0 โ (-1) = 1 Cycle 2: f1 = 0 + 1 = 1, f2 = 1 โ 1 = 0 Cycle 3: f1 = 1 + 0 = 1, f2 = 1 โ 0 = 1 Cycle 4: f1 = 1 + 1 = 2, f2 = 2 โ 1 = 1 Cycle 5: f1 = 2 + 1 = 3, f2 = 3 โ 1 = 2 Cycle 6: f1 = 3 + 2 = 5, f2 = 5 โ 2 = 3
CS/EE 3710
Compute 8 th^ Fibonacci number (8โd13 or 8โh0D) Store that number in memory location 255
CS/EE 3710
101000
4
Assembly Code Machine Code
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
Each block is 18k bits...
Block RAM is Single or Dual ported
CS/EE 3710
Clock Clk
Clk
CS/EE 3710
Clock Clk
Clk
So, what are the implications of using a RAM that has both clocked reads and writes instead of clocked writes and async reads? (weโll come back to this question...)
CS/EE 3710
CS/EE 3710
// simplified MIPS processor module mips #(parameter WIDTH = 8, REGBITS = 3) (input clk, reset, input [WIDTH-1:0] memdata, output memread, memwrite, output [WIDTH-1:0] adr, writedata); wire [31:0] instr; wire zero, alusrca, memtoreg, iord, pcen, regwrite, regdst; wire [1:0] aluop,pcsource,alusrcb; wire [3:0] irwrite; wire [2:0] alucont; controller cont(clk, reset, instr[31:26], zero, memread, memwrite, alusrca, memtoreg, iord, pcen, regwrite, regdst, pcsource, alusrcb, aluop, irwrite); alucontrol ac(aluop, instr[5:0], alucont); datapath #(WIDTH, REGBITS) dp(clk, reset, memdata, alusrca, memtoreg, iord, pcen, regwrite, regdst, pcsource, alusrcb, irwrite, alucont, zero, instr, adr, writedata); endmodule
CS/EE 3710
State Codes
Useful constants to compare against
State Register
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
Two register files? Why?
CS/EE 3710
Fairly complex...
Not really, but it does have lots of registers instantiated directly
It also instantiates muxes...
Instruction Register
CS/EE 3710
Flops and muxes...
RF and ALU
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
CS/EE 3710
One of those rare cases where using both edges of the clock is useful!
mips is expecting async reads exmem has clocked reads
CS/EE 3710
z That is, reading from an address in that range results in getting data from an I/O device z Writing to an address in that range results in data going to an I/O device