-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsynth_dnn.ys
More file actions
34 lines (24 loc) · 731 Bytes
/
synth_dnn.ys
File metadata and controls
34 lines (24 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Yosys synthesis script for DNN accelerator
# This script synthesizes the DNN accelerator to a gate-level netlist
# Read the Verilog design files
read_verilog mac_unit.v
read_verilog dnn_accelerator.v
# Select the top-level module
hierarchy -top dnn_accelerator
# Perform synthesis
synth -top dnn_accelerator
# Optimize the design
opt
# Map to generic gates (for demonstration)
# In a real FPGA flow, you would map to specific FPGA primitives
abc
# Write the synthesized Verilog netlist
write_verilog dnn_accelerator_synth.v
# Write JSON format for nextpnr (if using FPGA flow)
write_json dnn_accelerator.json
# Show statistics
stat
# Show the hierarchy
hierarchy
# Show the final netlist structure
show dnn_accelerator