
Project: Self-Testing Atomic Banked Memory Controller with Conflict Resolution,
Fair Arbitration and Backpressure. Top tt_um_vinay_mem_access, ID 0xb5,
TTSKY26e allocation 1x1, 10 MHz target. The tile contains two banks of four
4-bit words (32 logical storage bits), with all three clients and the checker
on-chip. The reusable native core is also tested at width 8.
Three internal clients share two independently arbitrated memory banks. Each bank stores four logical 4-bit words. Round-robin arbitration resolves bank conflicts, per-client response slots preserve data under backpressure, and atomic fetch-and-add returns the old value while committing an indivisible addition. Eight autonomous phases check ordinary accesses, concurrent banks, contended atomic increments, fairness and stalled receivers. All traffic generators and functional checking logic are synthesized inside the tile.
Apply power and clock, assert rst_n=0 for at least two rising edges, hold
ena=1, then release reset. Keep uio_in[4]=0. The three internal clients run
all eight phases without operands, commands or an external checker. After 189
enabled edges, normal completion exposes 0xa7 on uo_out.
Status bits: 7 PASS (done && !failed), 6 FAIL (sticky error exists), 5 DONE,
4 ACTIVE, 3 zero, 2:0 current phase. The completed negative diagnostic is 0x67; a timeout retains the phase
where it stopped in bits 2:0. Failure
can be visible before DONE; wait for DONE before interpreting final counters.
Clock and global enable must continue while the test runs.
ui_in[7:0] is the argument. uio_in[3:0] is the opcode, bit 4 command valid,
bit 5 response ready. uio_out[6] is command ready; bit 7 response valid.
uio_oe=0xc0; all other uio_out bits are zero.
A command is accepted on an enabled rising edge with command valid and ready. Hold opcode/argument stable until that edge. Each accepted command produces one byte response. Hold response ready low to stall; data and response valid are retained. A response can be consumed and replaced at the same edge. Global enable low freezes the circuit and masks both handshake outputs.
When no command response is pending, uo_out displays live status. When response
valid is high, uo_out displays the command response instead.
| Opcode | Function | Argument / returned byte |
|---|---|---|
| 0 | Restart autonomous run | Argument bit 0 negative diagnostic, bit 1 serialized mode; bits 7:2 must be zero. ACK 00, invalid argument ff |
| 1 | Status | Status bits above |
| 2 | Errors | bit 0 data mismatch; 1 unsolicited/excess response; 2 fairness bound; 3 missing coverage/completion count; 4 timeout; bits 7:5 zero |
| 3 | Accepted transactions | Saturating count |
| 4 | Consumed responses | Saturating count |
| 5 | Conflicts | Cycles with multiple eligible clients contending for an arbiter |
| 6 | Request stalls | Cycles with at least one valid, unaccepted request |
| 7 | Parallel service | Cycles accepting two requests |
| 8 | Elapsed enabled clocks | Counter bits 7:0 |
| 9 | Elapsed enabled clocks | Counter bits 11:8, zero padded |
| A..E | Reserved | ff |
| F | Architecture ID | b5 |
Arguments to read commands are ignored. Invalid restart arguments do not restart. Valid restart is allowed during a running test: it cancels the old workload, resets memory, counters and errors, then starts phase 0 with the new settings. Reset boots normal mode regardless of pin argument values. Restart response is an acknowledgement of starting the test; use DONE to detect completion.
Read the cycle bytes after DONE for a coherent snapshot. Typical results:
| Mode | Restart argument | Status | Errors | Accepted / returned | Cycles | Dual cycles |
|---|---|---|---|---|---|---|
| Normal parallel | 0 | a7 |
0 | 192 / 192 | 189 | 22 |
| Serialized comparison | 2 | a7 |
0 | 192 / 192 | 220 | 0 |
| Negative checker diagnostic | 1 | 67 |
1 | 192 / 192 | 189 | 22 |
| Negative + serialized | 3 | 67 |
1 | 192 / 192 | 220 | 0 |
Each run includes 24 contended atomic increments with response backpressure, independent old-value checking and final shared-counter readback. The normal counter value is 8 because the 4-bit arithmetic wraps modulo 16. The deliberate negative diagnostic changes one observed atomic response before comparison.
make demo generates a phase trace and build/test/memory_demo.vcd using only
clock/reset at the top pins. make test runs an independent randomized native
memory checker and the pin regression; make gate repeats the pin regression
on the routed gate netlist. The simulation testbench runs on the host; the test
sequencer, clients and checker listed in src/ are synthesized into the tile.
The autonomous test requires the Tiny Tapeout carrier or equivalent power, clock and reset connections. No external CPU, memory or reference checker is required. A host or logic analyzer is optional for diagnostic byte commands.
This project was executed by Vinay, Vineet V Havanur, Surya Radha Balaji , Tejas S Math and Shylashree N from RV College of Engineering. We gratefully acknowledge the Center of Excellence (CoE) in Integrated Circuits and Systems (ICAS) and the Department of Electronics and Communication Engineering (ECE) for providing the necessary resources and guidance.
Special thanks to Dr. H V Ravish Aradhya (HoD, ECE), Dr. K R Usha Rani (Associate Dean, PG), Dr. K. S. Geetha (Vice Principal), and Dr. K. N. Subramanya (Principal) for their encouragement and support for this Tiny Tapeout TTSKY26e project.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | data_in[0] | data_out[0] | command[0] |
| 1 | data_in[1] | data_out[1] | command[1] |
| 2 | data_in[2] | data_out[2] | command[2] |
| 3 | data_in[3] | data_out[3] | command[3] |
| 4 | data_in[4] | data_out[4] | in_valid |
| 5 | data_in[5] | data_out[5] | out_ready |
| 6 | data_in[6] | data_out[6] | in_ready |
| 7 | data_in[7] | data_out[7] | out_valid |