Skip to content

Commit d7698b7

Browse files
committed
Add images to README and fix typos
1 parent cb16849 commit d7698b7

File tree

6 files changed

+63
-12
lines changed

6 files changed

+63
-12
lines changed

README.md

+63-12
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,58 @@
99
`.__.-.__.'
1010
1111
```
12-
1312
----
1413

15-
DLX ISA, RISC microprocessor, VHDL implementation
14+
### Author Note
15+
> I don't like this folder structure but it was imposed on us to keep the project "tidier" and simpler to recognize the hierarchy from. To be honest the constraint is understandable but it's still awful to look at and use.
1616
1717
## Block Level Overview
1818
![top_level](./doc/images/top_level_github.drawio.png)
19-
19+
As can be seen in the block schema of the processor, data and instruction memories are placed outside the CPU.
20+
21+
## Data-path
22+
The data-path is represented in black, the control unit and its signals are blue and the hazard unit is purple.
23+
![data-path](doc/images/datapath.jpg)
24+
25+
## ALU
26+
The ALU features a Pentium 4 adder unit, a UltraSPARC T2 Shifter and Logic units and a behavioural comparator unit.
27+
![alu](doc/images/alu.jpg)
28+
29+
### T2 Shifter
30+
The shifter unit is based on the SUN UltraSPARC T2 design, with a three-stage
31+
shifter implemented using masks shifted by varying amounts and combined to obtain
32+
the required operation. The implemented unit is able to perform left and right
33+
logical shifts and right arithmetical shifts.
34+
![t2 Shifter Unit](doc/images/shifter.jpg)
35+
#### Mask Generator
36+
The mask generator generates four masks, that contain the
37+
input A signal shifted by 8, 16, 24 and 32 bits respectively. The shift direction is
38+
dictated by the op signal (`00` for logical left shift, `01` for logical right shifts and
39+
`10` for arithmetical right shifts). An additional signal, msb, generates a fifth mask
40+
that is used for AMOUNT values greater than 31. The value of msb is `0` when a
41+
logical shift is being performed and is equals to the most-significant bit of A when
42+
an arithmetic shift is selected.
43+
#### Coarse Shift
44+
The coarse shift stage selects the coarse mask by considering the 30
45+
most-significant bits of the AMOUNT signal. If AMOUNT is bigger than 31, the
46+
coarse shift will select the msb mask.
47+
#### Fine Shift
48+
The fine shift will shift the selected coarse mask by the three least-
49+
significant digits of AMOUNT , completing the shift operation
50+
51+
### T2 Logic Unit
52+
The T2 logic unit is able to perform five logical operations with just five NAND gates.
53+
![T2 Logic Unit](doc/images/logic.jpg)
2054

2155
## Dependencies
2256
- Questa Sim-64 10.7c
2357
- design compiler F-2011.09-SP3
2458
- Bash
25-
- Pearl
59+
- Perl
2660

2761
## How To Run An Assembly Program
2862
1) Write an Assembly program using the DLX isa found [here](./doc/isa.md)
29-
1) The size of your program (lines of code), must be so that it culd be saved in the instruction memory. If your program exceeds this size the design will not compile, in such case change the value `C_IMEM_ADDR_W` in file `./src/000-common.core/000-DLX_PKG.vhd` accordingly.
63+
1) The size of your program (lines of code), must be so that it could be saved in the instruction memory. If your program exceeds this size the design will not compile, in such case change the value `C_IMEM_ADDR_W` in file `./src/000-common.core/000-DLX_PKG.vhd` accordingly.
3064
2) If you need to address more then the default data-memory space change the variable
3165
`C_DMEM_ADDR_W` in file `./src/000-common.core/000-DLX_PKG.vhd` accordingly. The compiler can't catch this error, the design will simulate your design but will truncate the data-memory-addresses to comply with its internal address space.
3266

@@ -51,7 +85,7 @@ DLX ISA, RISC microprocessor, VHDL implementation
5185
```
5286
To change the simulation time modify the line `run 212us` in `./sim/sim.do`
5387

54-
5) The simulation will output the file `./sim/rf_dmemd.dump`. This file contains the content of the Register file (in order 0 to 31) and data memroy (in reverse order DATA_MEM_SIZE-1 downto 0). Check this file to see if your program is compliant with your behaviour (you obviously need to save the program state either in data memory of in the register file)
88+
5) The simulation will output the file `./sim/rf_dmemd.dump`. This file contains the content of the Register file (in order 0 to 31) and data memory (in reverse order `DATA_MEM_SIZE-1 downto 0`). Check this file to see if your program is compliant with your behaviour (you obviously need to save the program state either in data memory of in the register file)
5589

5690
## How To Syntesize The Design
5791
The design synthesized is only MELA without memories.
@@ -76,11 +110,11 @@ Select the configuration and the desired clock-period in nanoseconds (can be a f
76110
Synthesis outputs will be in the `./syn` folder, respectively:
77111
- `./syn/reports` will contain timing, area and power reports
78112
- `./syn/netlists` will contain the synthesized netlist
79-
- `./syn/design_compiler_sdc` will contain the `sdc` file generated by design compiler for this syntesis run
113+
- `./syn/design_compiler_sdc` will contain the `sdc` file generated by design compiler for this synthesis run
80114

81115
## Place And Route
82-
Here some nice pictures. No description for this process because we didn't know what we where doing, just followin a recepy, but nice pics.
83-
### Asic View
116+
Here some nice pictures. No description for this process because we didn't know what we where doing, just following a recipe, but nice pics.
117+
### ASIC View
84118
|All metal layers | Transistor cells |
85119
|----------------------------------------------------------------------|---------------------------------------------------------------|
86120
|![place_and_route](./doc/images/place_and_route.png) |![transistor_cells](./doc/images/transistor_cells_overview.png)|
@@ -93,7 +127,24 @@ Here some nice pictures. No description for this process because we didn't know
93127
![alu_space](./doc/images/ss_alu.png)
94128
95129
## Notes
96-
I don't like this folder strcuture but it was imposed on us to keep the project "tidier" and simpler to recognize the hierarchy from.
97-
To be honest the constraint is understandable but it's still aweful to look at and use.
130+
I don't like this folder structure but it was imposed on us to keep the project "tidier" and simpler to recognize the hierarchy from.
131+
To be honest the constraint is understandable but it's still awful to look at and use.
132+
133+
## ALU
134+
MELA's ALU features a Pentium 4 adder unit, UltraSPARC T2 Shifter and Logic units, and a behavioural comparator. The ALU can be configured to have behavioural implementations of the aforementioned units.
135+
136+
137+
For more info about MELA's architecture, check out the [report](doc/report.pdf)
138+
139+
## Nerd corner
140+
### Vim bindings
141+
Make sure the vim `PWD` is the root of the project
142+
```
143+
# compile the asm file open in the current buffer
144+
:nnoremap <F4> :!./scripts/assembler/assembler.sh % ./src/000-common.core/003-IMEM_INIT_FILE.txt<cr>
145+
# save all buffers and push to remote
146+
:nnoremap <F5> :wa<cr>:! rsync -hh -a --info=stats1,progress2 --partial /home/simone/Documents/00.PoliTO/1.2-MicroElectronic-Systems/DLX/ ms_polito:~/dlx_simone<cr>
147+
# compile on remote
148+
:nnoremap <F6> :! ssh ms_polito "cd ./dlx_simone; ./scripts/build.sh"<cr>
149+
```
98150
99-
[MicroEletronics PoliTO]

doc/images/alu.jpg

95.9 KB
Loading

doc/images/block_diagram.jpg

134 KB
Loading

doc/images/datapath.jpg

797 KB
Loading

doc/images/logic.jpg

73.4 KB
Loading

doc/images/shifter.jpg

215 KB
Loading

0 commit comments

Comments
 (0)