Skip to content

Commit c96388e

Browse files
authored
Merge pull request #1345 from Pinata-Consulting/mock-alu
asap7/mock-alu: a mock ALU with registered inputs and outputs
2 parents 3c5adbe + f2e1d36 commit c96388e

File tree

17 files changed

+809
-0
lines changed

17 files changed

+809
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Mock ALU
2+
========
3+
4+
A mock ALU that can be configured in different sizes to generate
5+
interesting test-cases.
6+
7+
By default, the ALU is 64 bit wide.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"_SDC_FILE_PATH": "constraints.sdc",
3+
"_SDC_CLK_PERIOD": {
4+
"type": "float",
5+
"minmax": [
6+
0.1,
7+
0.4
8+
],
9+
"step": 0
10+
},
11+
"CORE_UTILIZATION": {
12+
"type": "int",
13+
"minmax": [
14+
5,
15+
100
16+
],
17+
"step": 1
18+
},
19+
"CORE_ASPECT_RATIO": {
20+
"type": "float",
21+
"minmax": [
22+
0.5,
23+
2.0
24+
],
25+
"step": 0
26+
},
27+
"CORE_MARGIN": {
28+
"type": "int",
29+
"minmax": [
30+
2,
31+
2
32+
],
33+
"step": 0
34+
},
35+
"CELL_PAD_IN_SITES_GLOBAL_PLACEMENT": {
36+
"type": "int",
37+
"minmax": [
38+
0,
39+
5
40+
],
41+
"step": 1
42+
},
43+
"CELL_PAD_IN_SITES_DETAIL_PLACEMENT": {
44+
"type": "int",
45+
"minmax": [
46+
0,
47+
5
48+
],
49+
"step": 1
50+
},
51+
"_FR_LAYER_ADJUST": {
52+
"type": "float",
53+
"minmax": [
54+
0.1,
55+
0.7
56+
],
57+
"step": 0
58+
},
59+
"PLACE_DENSITY_LB_ADDON": {
60+
"type": "float",
61+
"minmax": [
62+
0.0,
63+
0.99
64+
],
65+
"step": 0
66+
},
67+
"_PINS_DISTANCE": {
68+
"type": "int",
69+
"minmax": [
70+
1,
71+
4
72+
],
73+
"step": 1
74+
},
75+
"CTS_CLUSTER_SIZE": {
76+
"type": "int",
77+
"minmax": [
78+
10,
79+
200
80+
],
81+
"step": 1
82+
},
83+
"CTS_CLUSTER_DIAMETER": {
84+
"type": "int",
85+
"minmax": [
86+
20,
87+
400
88+
],
89+
"step": 1
90+
},
91+
"_FR_FILE_PATH": "",
92+
"_FR_GR_OVERFLOW": {
93+
"type": "int",
94+
"minmax": [
95+
1,
96+
1
97+
],
98+
"step": 0
99+
}
100+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
include designs/asap7/mock-alu/defaults.mk
2+
3+
export DESIGN_NAME = MockAlu
4+
export DESIGN_NICKNAME = mock-alu
5+
6+
export VERILOG_FILES = designs/src/mock-alu/*.v
7+
8+
export SDC_FILE = designs/asap7/mock-alu/constraints.sdc
9+
10+
export PLATFORM = asap7
11+
12+
export PLACE_DENSITY = 0.60
13+
export CORE_UTILIZATION = 40
14+
export CORE_ASPECT_RATIO = 1
15+
export CORE_MARGIN = 2
16+
17+
verilog:
18+
export MOCK_ALU_WIDTH=$(word 1, $(MOCK_ALU_WIDTH)) ; \
19+
./designs/asap7/mock-alu/verilog.sh
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set clk_name clock
2+
set clk_port_name clock
3+
set clk_period 500
4+
set clk_io_pct 0.2
5+
6+
set clk_port [get_ports $clk_port_name]
7+
8+
create_clock -name $clk_name -period $clk_period $clk_port
9+
10+
set non_clock_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port]
11+
12+
set_input_delay [expr $clk_period * $clk_io_pct] -clock $clk_name $non_clock_inputs
13+
set_output_delay [expr $clk_period * $clk_io_pct] -clock $clk_name [all_outputs]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export MOCK_ALU_WIDTH ?= 64

0 commit comments

Comments
 (0)