Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your task to to write a testbench for this device that tests the device sufficie

ID: 1796925 • Letter: Y

Question

Your task to to write a testbench for this device that tests the device sufficiently to separate good chips from bad chips. Your testbench will be applied to five or more HT6116 devices. Many of these devices are bad. The chips will be taken from a population that has these properties:

$display($time,": Device is GOOD");
$finish;

When you detect a bad chip, execute the following procedural statements verbatim:

$display($time,": Device is BAD");
$finish;

Link to RAM module and datasheet:

https://docs.google.com/open?id=0B2cx5wXjIU1IZTg3YTIwNGYtZTUxZS00OTdiLTlhNjYtOTUzNWJhMmZjZTg2

https://docs.google.com/open?id=0B2cx5wXjIU1IMTUxZGFjZmUtZmM1MC00NzJiLThiZDktNzdjZmYxMDUzMGVl

Explanation / Answer

module mem_ram_sync( clk, rst, read_rq, write_rq, rw_address, write_data, read_data ); input clk; input rst; input read_rq; input write_rq; input[5:0] rw_address; input[7:0] write_data; output[7:0] read_data; reg[7:0] read_data; integer out, i; // Declare memory 64x8 bits = 512 bits or 64 bytes reg [7:0] memory_ram_d [63:0]; reg [7:0] memory_ram_q [63:0]; // Use positive edge of clock to read the memory // Implement cyclic shift right always @(posedge clk or negedge rst) begin if (!rst) begin for (i=0;i