Home › Practice › RTL Design › Memory spare-row repair wrapper
Memory spare-row repair wrapper
MediumDFTRTLcombinational
A memory macro has 16 main rows plus 1 spare row for yield repair. This combinational wrapper intercepts accesses to a faulty address and redirects them to the spare row. The starter code compiles, but three bugs break repair and idle gating.
Concept first. Manufacturing defects often kill just one row of a large RAM. Rather than throwing away the whole chip, fuses store the failing row address (bad_addr) and turn on repair (rep_en=1). Any read or write targeting bad_addr is routed to the spare row while the main bank stays deselected, keeping the faulty row completely out of use.
What the circuit must do.
- Inputs:
req(1 = access active),wr(1 = write, 0 = read),rep_en,addr[3:0],bad_addr[3:0],main_rdata[7:0],spare_rdata[7:0]. - Outputs:
main_cs,spare_cs,main_we,spare_we,main_addr[3:0],rdata[7:0]. No clock. - A repair hit occurs when
rep_en=1andaddr == bad_addr. - When
req=1and hit is false, select the main bank only (main_cs=1, spare_cs=0). Whenreq=1and hit is true, select the spare row only (main_cs=0, spare_cs=1). Whenreq=0, both selects are 0. - Write enables follow the active chip select:
main_we = main_cs & wrandspare_we = spare_cs & wr. main_addralways passesaddrthrough.rdatareturnsspare_rdataon a read hit,main_rdataon a normal read, and8'd0whenever idle (req=0) or writing (wr=1).
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.