Table of Contents
This is a simulation of a configurable cache in SystemVerilog. In this simulation, we take instructions as input. (Since EDA playground has file size limit of 1,00,000 characters, we have considered at most 10,000 instructions.) It has following format:
- Blank space followed by operation bit (1 for read and 2 for write)
- Memory address of 6 hex-digits.
The address tag is compared to the tag value in the cache and , the data is either found in the cache, identifying a hit, or in case of a miss, it's pulled from the memory. Thereafter, based on the type of operation, read or write takes place. Finally hit rate is calculated and displayed along with number of read/write hits.
This is our submission for CSN-221 Course Project-1.
Since there is no satisfactory compiler for SystemVerilog, so this Project has had to be run on online SystemVerilog Simulators like Aldec Riviera Pro 2022.04, which we used to make this project.
To run this project follow these steps:
This is a web application that allows users to edit, simulate, synthesize, and share their HDL code written in languages like SystemVerilog.
- Go to https://www.edaplayground.com/
- Login by clicking on
Loginin the top-right corner
- Copy-paste the code in
testbench.svintotestbench.svon EDA-Playground - Create a new file named
Assembler.svand paste theAssembler.svcode into it. - From http://www.cs.toronto.edu/~reid/csc150/02f/a2/traces.html copy the instruction sets and paste them into
input.txt. If_Number_instructionsis greater than 10,000, take first 10,000 instructions only. - Change
_Number_instructionsfrom line number 8 oftestbench.svand line number 1 fromAssembler.svaccordingly. - If chosen instruction set is
qsortormm16, then changeline[2]toline[1]from line number 80 ofAssembler.sv. - Set up the configurations by making necessary changes in line number 4 to 8 in
testbench.sv. - By default,
input.txtcontains instruction setluand configuration is set as 32 kB cache size, 8 ways and block size of 64 bytes.
- Click on
Tools & Simulatorsin left side-bar - Select
Aldec Riviera Pro 2022.04from the dropdown menu
- Save the playground and then click
Run - Output will be shown in
Logtab at the bottom
Contributors of this Group project:
Ashutosh Kalidas Pise (21114073) |
Ashutosh Kumar (21114021) |
KirtanKumar VijayKumar Patel (21114051) |
Mudit Gupta (21114061) |
Rishi Kejriwal (21114081) |
Rohan Kalra (21114083) |