librelane 2.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of librelane might be problematic. Click here for more details.
- librelane/__init__.py +38 -0
- librelane/__main__.py +479 -0
- librelane/__version__.py +43 -0
- librelane/common/__init__.py +63 -0
- librelane/common/cli.py +75 -0
- librelane/common/drc.py +246 -0
- librelane/common/generic_dict.py +319 -0
- librelane/common/metrics/__init__.py +35 -0
- librelane/common/metrics/__main__.py +413 -0
- librelane/common/metrics/library.py +354 -0
- librelane/common/metrics/metric.py +186 -0
- librelane/common/metrics/util.py +279 -0
- librelane/common/misc.py +456 -0
- librelane/common/ring_buffer.py +63 -0
- librelane/common/tcl.py +80 -0
- librelane/common/toolbox.py +549 -0
- librelane/common/tpe.py +41 -0
- librelane/common/types.py +116 -0
- librelane/config/__init__.py +32 -0
- librelane/config/__main__.py +155 -0
- librelane/config/config.py +1025 -0
- librelane/config/flow.py +490 -0
- librelane/config/pdk_compat.py +255 -0
- librelane/config/preprocessor.py +464 -0
- librelane/config/removals.py +45 -0
- librelane/config/variable.py +743 -0
- librelane/container.py +285 -0
- librelane/env_info.py +320 -0
- librelane/examples/spm/config.yaml +33 -0
- librelane/examples/spm/pin_order.cfg +14 -0
- librelane/examples/spm/src/impl.sdc +73 -0
- librelane/examples/spm/src/signoff.sdc +68 -0
- librelane/examples/spm/src/spm.v +73 -0
- librelane/examples/spm/verify/spm_tb.v +106 -0
- librelane/examples/spm-user_project_wrapper/SPM_example.v +286 -0
- librelane/examples/spm-user_project_wrapper/base_sdc_file.sdc +145 -0
- librelane/examples/spm-user_project_wrapper/config-tut.json +12 -0
- librelane/examples/spm-user_project_wrapper/config.json +13 -0
- librelane/examples/spm-user_project_wrapper/defines.v +66 -0
- librelane/examples/spm-user_project_wrapper/template.def +7656 -0
- librelane/examples/spm-user_project_wrapper/user_project_wrapper.v +123 -0
- librelane/flows/__init__.py +24 -0
- librelane/flows/builtins.py +18 -0
- librelane/flows/classic.py +327 -0
- librelane/flows/cli.py +463 -0
- librelane/flows/flow.py +1049 -0
- librelane/flows/misc.py +71 -0
- librelane/flows/optimizing.py +179 -0
- librelane/flows/sequential.py +367 -0
- librelane/flows/synth_explore.py +173 -0
- librelane/help/__main__.py +39 -0
- librelane/logging/__init__.py +40 -0
- librelane/logging/logger.py +323 -0
- librelane/open_pdks_rev +1 -0
- librelane/plugins.py +21 -0
- librelane/py.typed +0 -0
- librelane/scripts/base.sdc +80 -0
- librelane/scripts/klayout/Readme.md +2 -0
- librelane/scripts/klayout/open_design.py +63 -0
- librelane/scripts/klayout/render.py +121 -0
- librelane/scripts/klayout/stream_out.py +176 -0
- librelane/scripts/klayout/xml_drc_report_to_json.py +45 -0
- librelane/scripts/klayout/xor.drc +120 -0
- librelane/scripts/magic/Readme.md +1 -0
- librelane/scripts/magic/common/read.tcl +114 -0
- librelane/scripts/magic/def/antenna_check.tcl +35 -0
- librelane/scripts/magic/def/mag.tcl +19 -0
- librelane/scripts/magic/def/mag_gds.tcl +79 -0
- librelane/scripts/magic/drc.tcl +78 -0
- librelane/scripts/magic/extract_spice.tcl +98 -0
- librelane/scripts/magic/gds/drc_batch.tcl +74 -0
- librelane/scripts/magic/gds/erase_box.tcl +32 -0
- librelane/scripts/magic/gds/extras_mag.tcl +45 -0
- librelane/scripts/magic/gds/mag_with_pointers.tcl +31 -0
- librelane/scripts/magic/get_bbox.tcl +11 -0
- librelane/scripts/magic/lef/extras_maglef.tcl +61 -0
- librelane/scripts/magic/lef/maglef.tcl +26 -0
- librelane/scripts/magic/lef.tcl +57 -0
- librelane/scripts/magic/open.tcl +28 -0
- librelane/scripts/magic/wrapper.tcl +21 -0
- librelane/scripts/netgen/setup.tcl +28 -0
- librelane/scripts/odbpy/apply_def_template.py +49 -0
- librelane/scripts/odbpy/cell_frequency.py +107 -0
- librelane/scripts/odbpy/check_antenna_properties.py +116 -0
- librelane/scripts/odbpy/contextualize.py +109 -0
- librelane/scripts/odbpy/defutil.py +573 -0
- librelane/scripts/odbpy/diodes.py +373 -0
- librelane/scripts/odbpy/disconnected_pins.py +305 -0
- librelane/scripts/odbpy/eco_buffer.py +181 -0
- librelane/scripts/odbpy/eco_diode.py +139 -0
- librelane/scripts/odbpy/filter_unannotated.py +100 -0
- librelane/scripts/odbpy/io_place.py +482 -0
- librelane/scripts/odbpy/ioplace_parser/__init__.py +23 -0
- librelane/scripts/odbpy/ioplace_parser/parse.py +147 -0
- librelane/scripts/odbpy/label_macro_pins.py +277 -0
- librelane/scripts/odbpy/lefutil.py +97 -0
- librelane/scripts/odbpy/placers.py +162 -0
- librelane/scripts/odbpy/power_utils.py +397 -0
- librelane/scripts/odbpy/random_place.py +57 -0
- librelane/scripts/odbpy/reader.py +250 -0
- librelane/scripts/odbpy/remove_buffers.py +173 -0
- librelane/scripts/odbpy/snap_to_grid.py +57 -0
- librelane/scripts/odbpy/wire_lengths.py +93 -0
- librelane/scripts/openroad/antenna_check.tcl +20 -0
- librelane/scripts/openroad/antenna_repair.tcl +31 -0
- librelane/scripts/openroad/basic_mp.tcl +24 -0
- librelane/scripts/openroad/buffer_list.tcl +10 -0
- librelane/scripts/openroad/common/dpl.tcl +24 -0
- librelane/scripts/openroad/common/dpl_cell_pad.tcl +26 -0
- librelane/scripts/openroad/common/grt.tcl +32 -0
- librelane/scripts/openroad/common/io.tcl +540 -0
- librelane/scripts/openroad/common/pdn_cfg.tcl +135 -0
- librelane/scripts/openroad/common/resizer.tcl +103 -0
- librelane/scripts/openroad/common/set_global_connections.tcl +78 -0
- librelane/scripts/openroad/common/set_layer_adjustments.tcl +31 -0
- librelane/scripts/openroad/common/set_power_nets.tcl +30 -0
- librelane/scripts/openroad/common/set_rc.tcl +75 -0
- librelane/scripts/openroad/common/set_routing_layers.tcl +30 -0
- librelane/scripts/openroad/cts.tcl +80 -0
- librelane/scripts/openroad/cut_rows.tcl +24 -0
- librelane/scripts/openroad/dpl.tcl +24 -0
- librelane/scripts/openroad/drt.tcl +37 -0
- librelane/scripts/openroad/fill.tcl +30 -0
- librelane/scripts/openroad/floorplan.tcl +145 -0
- librelane/scripts/openroad/gpl.tcl +88 -0
- librelane/scripts/openroad/grt.tcl +30 -0
- librelane/scripts/openroad/gui.tcl +37 -0
- librelane/scripts/openroad/insert_buffer.tcl +127 -0
- librelane/scripts/openroad/ioplacer.tcl +67 -0
- librelane/scripts/openroad/irdrop.tcl +51 -0
- librelane/scripts/openroad/pdn.tcl +52 -0
- librelane/scripts/openroad/rcx.tcl +32 -0
- librelane/scripts/openroad/repair_design.tcl +70 -0
- librelane/scripts/openroad/repair_design_postgrt.tcl +48 -0
- librelane/scripts/openroad/rsz_timing_postcts.tcl +68 -0
- librelane/scripts/openroad/rsz_timing_postgrt.tcl +70 -0
- librelane/scripts/openroad/sta/check_macro_instances.tcl +53 -0
- librelane/scripts/openroad/sta/corner.tcl +393 -0
- librelane/scripts/openroad/tapcell.tcl +25 -0
- librelane/scripts/openroad/write_views.tcl +27 -0
- librelane/scripts/pyosys/construct_abc_script.py +177 -0
- librelane/scripts/pyosys/json_header.py +84 -0
- librelane/scripts/pyosys/synthesize.py +493 -0
- librelane/scripts/pyosys/ys_common.py +153 -0
- librelane/scripts/tclsh/hello.tcl +1 -0
- librelane/state/__init__.py +24 -0
- librelane/state/__main__.py +61 -0
- librelane/state/design_format.py +195 -0
- librelane/state/state.py +359 -0
- librelane/steps/__init__.py +61 -0
- librelane/steps/__main__.py +510 -0
- librelane/steps/checker.py +637 -0
- librelane/steps/common_variables.py +340 -0
- librelane/steps/cvc_rv.py +169 -0
- librelane/steps/klayout.py +509 -0
- librelane/steps/magic.py +576 -0
- librelane/steps/misc.py +160 -0
- librelane/steps/netgen.py +253 -0
- librelane/steps/odb.py +1088 -0
- librelane/steps/openroad.py +2460 -0
- librelane/steps/openroad_alerts.py +102 -0
- librelane/steps/pyosys.py +640 -0
- librelane/steps/step.py +1571 -0
- librelane/steps/tclstep.py +288 -0
- librelane/steps/verilator.py +222 -0
- librelane/steps/yosys.py +371 -0
- librelane-2.4.0.dist-info/METADATA +169 -0
- librelane-2.4.0.dist-info/RECORD +170 -0
- librelane-2.4.0.dist-info/WHEEL +4 -0
- librelane-2.4.0.dist-info/entry_points.txt +9 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# generated by get_cup_sdc.py
|
|
2
|
+
# Date: 2023/06/20
|
|
3
|
+
|
|
4
|
+
### Note:
|
|
5
|
+
# - input clock transition and latency are set for wb_clk_i port.
|
|
6
|
+
# If your design is using the user_clock2, update the clock constraints to reflect that and use usr_* variables.
|
|
7
|
+
# - IO ports are assumed to be asynchronous. If they're synchronous to the clock, update the variable IO_SYNC to 1.
|
|
8
|
+
# As well, update in_ext_delay and out_ext_delay with the required I/O external delays.
|
|
9
|
+
|
|
10
|
+
#------------------------------------------#
|
|
11
|
+
# Pre-defined Constraints
|
|
12
|
+
#------------------------------------------#
|
|
13
|
+
|
|
14
|
+
# Clock network
|
|
15
|
+
set ::env(IO_SYNC) 0
|
|
16
|
+
if {[info exists ::env(CLOCK_PORT)] && $::env(CLOCK_PORT) != ""} {
|
|
17
|
+
set clk_input $::env(CLOCK_PORT)
|
|
18
|
+
create_clock [get_ports $clk_input] -name clk -period $::env(CLOCK_PERIOD)
|
|
19
|
+
puts "\[INFO\]: Creating clock {clk} for port $clk_input with period: $::env(CLOCK_PERIOD)"
|
|
20
|
+
} else {
|
|
21
|
+
set clk_input __VIRTUAL_CLK__
|
|
22
|
+
create_clock -name clk -period $::env(CLOCK_PERIOD)
|
|
23
|
+
puts "\[INFO\]: Creating virtual clock with period: $::env(CLOCK_PERIOD)"
|
|
24
|
+
}
|
|
25
|
+
if { ![info exists ::env(SYNTH_CLK_DRIVING_CELL)] } {
|
|
26
|
+
set ::env(SYNTH_CLK_DRIVING_CELL) $::env(SYNTH_DRIVING_CELL)
|
|
27
|
+
}
|
|
28
|
+
if { ![info exists ::env(SYNTH_CLK_DRIVING_CELL_PIN)] } {
|
|
29
|
+
set ::env(SYNTH_CLK_DRIVING_CELL_PIN) $::env(SYNTH_DRIVING_CELL_PIN)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
# Clock non-idealities
|
|
33
|
+
set_propagated_clock [all_clocks]
|
|
34
|
+
set_clock_uncertainty $::env(SYNTH_CLOCK_UNCERTAINTY) [get_clocks {clk}]
|
|
35
|
+
puts "\[INFO\]: Setting clock uncertainity to: $::env(SYNTH_CLOCK_UNCERTAINTY)"
|
|
36
|
+
set_clock_transition $::env(SYNTH_CLOCK_TRANSITION) [get_clocks {clk}]
|
|
37
|
+
puts "\[INFO\]: Setting clock transition to: $::env(SYNTH_CLOCK_TRANSITION)"
|
|
38
|
+
|
|
39
|
+
# Maximum transition time for the design nets
|
|
40
|
+
set_max_transition $::env(MAX_TRANSITION_CONSTRAINT) [current_design]
|
|
41
|
+
puts "\[INFO\]: Setting maximum transition to: $::env(MAX_TRANSITION_CONSTRAINT)"
|
|
42
|
+
|
|
43
|
+
# Maximum fanout
|
|
44
|
+
set_max_fanout $::env(MAX_FANOUT_CONSTRAINT) [current_design]
|
|
45
|
+
puts "\[INFO\]: Setting maximum fanout to: $::env(MAX_FANOUT_CONSTRAINT)"
|
|
46
|
+
|
|
47
|
+
# Timing paths delays derate
|
|
48
|
+
set_timing_derate -early [expr {1-$::env(SYNTH_TIMING_DERATE)}]
|
|
49
|
+
set_timing_derate -late [expr {1+$::env(SYNTH_TIMING_DERATE)}]
|
|
50
|
+
puts "\[INFO\]: Setting timing derate to: [expr {$::env(SYNTH_TIMING_DERATE) * 100}] %"
|
|
51
|
+
|
|
52
|
+
# Reset input delay
|
|
53
|
+
set_input_delay [expr $::env(CLOCK_PERIOD) * 0.5] -clock [get_clocks {clk}] [get_ports {wb_rst_i}]
|
|
54
|
+
|
|
55
|
+
# Multicycle paths
|
|
56
|
+
set_multicycle_path -setup 2 -through [get_ports {wbs_ack_o}]
|
|
57
|
+
set_multicycle_path -hold 1 -through [get_ports {wbs_ack_o}]
|
|
58
|
+
set_multicycle_path -setup 2 -through [get_ports {wbs_cyc_i}]
|
|
59
|
+
set_multicycle_path -hold 1 -through [get_ports {wbs_cyc_i}]
|
|
60
|
+
set_multicycle_path -setup 2 -through [get_ports {wbs_stb_i}]
|
|
61
|
+
set_multicycle_path -hold 1 -through [get_ports {wbs_stb_i}]
|
|
62
|
+
|
|
63
|
+
#------------------------------------------#
|
|
64
|
+
# Retrieved Constraints
|
|
65
|
+
#------------------------------------------#
|
|
66
|
+
|
|
67
|
+
# Clock source latency
|
|
68
|
+
set usr_clk_max_latency 4.57
|
|
69
|
+
set usr_clk_min_latency 4.11
|
|
70
|
+
set clk_max_latency 5.57
|
|
71
|
+
set clk_min_latency 4.65
|
|
72
|
+
set_clock_latency -source -max $clk_max_latency [get_clocks {clk}]
|
|
73
|
+
set_clock_latency -source -min $clk_min_latency [get_clocks {clk}]
|
|
74
|
+
puts "\[INFO\]: Setting clock latency range: $clk_min_latency : $clk_max_latency"
|
|
75
|
+
|
|
76
|
+
# Clock input Transition
|
|
77
|
+
set usr_clk_tran 0.13
|
|
78
|
+
set clk_tran 0.61
|
|
79
|
+
set_input_transition $clk_tran [get_ports $clk_input]
|
|
80
|
+
puts "\[INFO\]: Setting clock transition: $clk_tran"
|
|
81
|
+
|
|
82
|
+
# Input delays
|
|
83
|
+
set_input_delay -max 1.87 -clock [get_clocks {clk}] [get_ports {la_data_in[*]}]
|
|
84
|
+
set_input_delay -max 1.89 -clock [get_clocks {clk}] [get_ports {la_oenb[*]}]
|
|
85
|
+
set_input_delay -max 3.17 -clock [get_clocks {clk}] [get_ports {wbs_sel_i[*]}]
|
|
86
|
+
set_input_delay -max 3.74 -clock [get_clocks {clk}] [get_ports {wbs_we_i}]
|
|
87
|
+
set_input_delay -max 3.89 -clock [get_clocks {clk}] [get_ports {wbs_adr_i[*]}]
|
|
88
|
+
set_input_delay -max 4.13 -clock [get_clocks {clk}] [get_ports {wbs_stb_i}]
|
|
89
|
+
set_input_delay -max 4.61 -clock [get_clocks {clk}] [get_ports {wbs_dat_i[*]}]
|
|
90
|
+
set_input_delay -max 4.74 -clock [get_clocks {clk}] [get_ports {wbs_cyc_i}]
|
|
91
|
+
set_input_delay -min 0.18 -clock [get_clocks {clk}] [get_ports {la_data_in[*]}]
|
|
92
|
+
set_input_delay -min 0.3 -clock [get_clocks {clk}] [get_ports {la_oenb[*]}]
|
|
93
|
+
set_input_delay -min 0.79 -clock [get_clocks {clk}] [get_ports {wbs_adr_i[*]}]
|
|
94
|
+
set_input_delay -min 1.04 -clock [get_clocks {clk}] [get_ports {wbs_dat_i[*]}]
|
|
95
|
+
set_input_delay -min 1.19 -clock [get_clocks {clk}] [get_ports {wbs_sel_i[*]}]
|
|
96
|
+
set_input_delay -min 1.65 -clock [get_clocks {clk}] [get_ports {wbs_we_i}]
|
|
97
|
+
set_input_delay -min 1.69 -clock [get_clocks {clk}] [get_ports {wbs_cyc_i}]
|
|
98
|
+
set_input_delay -min 1.86 -clock [get_clocks {clk}] [get_ports {wbs_stb_i}]
|
|
99
|
+
if { $::env(IO_SYNC) } {
|
|
100
|
+
set in_ext_delay 4
|
|
101
|
+
puts "\[INFO\]: Setting input ports external delay to: $in_ext_delay"
|
|
102
|
+
set_input_delay -max [expr $in_ext_delay + 4.55] -clock [get_clocks {clk}] [get_ports {io_in[*]}]
|
|
103
|
+
set_input_delay -min [expr $in_ext_delay + 1.26] -clock [get_clocks {clk}] [get_ports {io_in[*]}]
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
# Input Transition
|
|
107
|
+
set_input_transition -max 0.14 [get_ports {wbs_we_i}]
|
|
108
|
+
set_input_transition -max 0.15 [get_ports {wbs_stb_i}]
|
|
109
|
+
set_input_transition -max 0.17 [get_ports {wbs_cyc_i}]
|
|
110
|
+
set_input_transition -max 0.18 [get_ports {wbs_sel_i[*]}]
|
|
111
|
+
set_input_transition -max 0.38 [get_ports {io_in[*]}]
|
|
112
|
+
set_input_transition -max 0.84 [get_ports {wbs_dat_i[*]}]
|
|
113
|
+
set_input_transition -max 0.86 [get_ports {la_data_in[*]}]
|
|
114
|
+
set_input_transition -max 0.92 [get_ports {wbs_adr_i[*]}]
|
|
115
|
+
set_input_transition -max 0.97 [get_ports {la_oenb[*]}]
|
|
116
|
+
set_input_transition -min 0.05 [get_ports {io_in[*]}]
|
|
117
|
+
set_input_transition -min 0.06 [get_ports {la_oenb[*]}]
|
|
118
|
+
set_input_transition -min 0.07 [get_ports {la_data_in[*]}]
|
|
119
|
+
set_input_transition -min 0.07 [get_ports {wbs_adr_i[*]}]
|
|
120
|
+
set_input_transition -min 0.07 [get_ports {wbs_dat_i[*]}]
|
|
121
|
+
set_input_transition -min 0.09 [get_ports {wbs_cyc_i}]
|
|
122
|
+
set_input_transition -min 0.09 [get_ports {wbs_sel_i[*]}]
|
|
123
|
+
set_input_transition -min 0.09 [get_ports {wbs_we_i}]
|
|
124
|
+
set_input_transition -min 0.15 [get_ports {wbs_stb_i}]
|
|
125
|
+
|
|
126
|
+
# Output delays
|
|
127
|
+
set_output_delay -max 0.7 -clock [get_clocks {clk}] [get_ports {user_irq[*]}]
|
|
128
|
+
set_output_delay -max 1.0 -clock [get_clocks {clk}] [get_ports {la_data_out[*]}]
|
|
129
|
+
set_output_delay -max 3.62 -clock [get_clocks {clk}] [get_ports {wbs_dat_o[*]}]
|
|
130
|
+
set_output_delay -max 8.41 -clock [get_clocks {clk}] [get_ports {wbs_ack_o}]
|
|
131
|
+
set_output_delay -min 0 -clock [get_clocks {clk}] [get_ports {la_data_out[*]}]
|
|
132
|
+
set_output_delay -min 0 -clock [get_clocks {clk}] [get_ports {user_irq[*]}]
|
|
133
|
+
set_output_delay -min 1.13 -clock [get_clocks {clk}] [get_ports {wbs_dat_o[*]}]
|
|
134
|
+
set_output_delay -min 1.37 -clock [get_clocks {clk}] [get_ports {wbs_ack_o}]
|
|
135
|
+
if { $::env(IO_SYNC) } {
|
|
136
|
+
set out_ext_delay 4
|
|
137
|
+
puts "\[INFO\]: Setting output ports external delay to: $out_ext_delay"
|
|
138
|
+
set_output_delay -max [expr $out_ext_delay + 9.12] -clock [get_clocks {clk}] [get_ports {io_out[*]}]
|
|
139
|
+
set_output_delay -max [expr $out_ext_delay + 9.32] -clock [get_clocks {clk}] [get_ports {io_oeb[*]}]
|
|
140
|
+
set_output_delay -min [expr $out_ext_delay + 2.34] -clock [get_clocks {clk}] [get_ports {io_oeb[*]}]
|
|
141
|
+
set_output_delay -min [expr $out_ext_delay + 3.9] -clock [get_clocks {clk}] [get_ports {io_out[*]}]
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
# Output loads
|
|
145
|
+
set_load 0.19 [all_outputs]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"DESIGN_NAME": "SPM_example",
|
|
3
|
+
"VERILOG_FILES": ["dir::./defines.v", "dir::./SPM_example.v"],
|
|
4
|
+
"CLOCK_PERIOD": 25,
|
|
5
|
+
"CLOCK_PORT": "wb_clk_i",
|
|
6
|
+
"CLOCK_NET": "SPM.clk",
|
|
7
|
+
"RT_MAX_LAYER": "met4",
|
|
8
|
+
"FP_SIZING": "absolute",
|
|
9
|
+
"VDD_NETS": ["vccd1"],
|
|
10
|
+
"GND_NETS": ["vssd1"],
|
|
11
|
+
"FP_PDN_MULTILAYER": false,
|
|
12
|
+
"DIE_AREA": [0, 0, 600, 600]
|
|
13
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2020 Efabless Corporation
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
15
|
+
|
|
16
|
+
`default_nettype none
|
|
17
|
+
|
|
18
|
+
`ifndef __GLOBAL_DEFINE_H
|
|
19
|
+
// Global parameters
|
|
20
|
+
`define __GLOBAL_DEFINE_H
|
|
21
|
+
|
|
22
|
+
`define MPRJ_IO_PADS_1 19 /* number of user GPIO pads on user1 side */
|
|
23
|
+
`define MPRJ_IO_PADS_2 19 /* number of user GPIO pads on user2 side */
|
|
24
|
+
`define MPRJ_IO_PADS (`MPRJ_IO_PADS_1 + `MPRJ_IO_PADS_2)
|
|
25
|
+
|
|
26
|
+
`define MPRJ_PWR_PADS_1 2 /* vdda1, vccd1 enable/disable control */
|
|
27
|
+
`define MPRJ_PWR_PADS_2 2 /* vdda2, vccd2 enable/disable control */
|
|
28
|
+
`define MPRJ_PWR_PADS (`MPRJ_PWR_PADS_1 + `MPRJ_PWR_PADS_2)
|
|
29
|
+
|
|
30
|
+
// Analog pads are only used by the "caravan" module and associated
|
|
31
|
+
// modules such as user_analog_project_wrapper and chip_io_alt.
|
|
32
|
+
|
|
33
|
+
`define ANALOG_PADS_1 5
|
|
34
|
+
`define ANALOG_PADS_2 6
|
|
35
|
+
|
|
36
|
+
`define ANALOG_PADS (`ANALOG_PADS_1 + `ANALOG_PADS_2)
|
|
37
|
+
|
|
38
|
+
// Size of soc_mem_synth
|
|
39
|
+
|
|
40
|
+
// Type and size of soc_mem
|
|
41
|
+
// `define USE_OPENRAM
|
|
42
|
+
`define USE_CUSTOM_DFFRAM
|
|
43
|
+
// don't change the following without double checking addr widths
|
|
44
|
+
`define MEM_WORDS 256
|
|
45
|
+
|
|
46
|
+
// Number of columns in the custom memory; takes one of three values:
|
|
47
|
+
// 1 column : 1 KB, 2 column: 2 KB, 4 column: 4KB
|
|
48
|
+
`define DFFRAM_WSIZE 4
|
|
49
|
+
`define DFFRAM_USE_LATCH 0
|
|
50
|
+
|
|
51
|
+
// not really parameterized but just to easily keep track of the number
|
|
52
|
+
// of ram_block across different modules
|
|
53
|
+
`define RAM_BLOCKS 1
|
|
54
|
+
|
|
55
|
+
// Clock divisor default value
|
|
56
|
+
`define CLK_DIV 3'b010
|
|
57
|
+
|
|
58
|
+
// GPIO control default mode and enable for most I/Os
|
|
59
|
+
// Most I/Os set to be user input pins on startup.
|
|
60
|
+
// NOTE: To be modified, with GPIOs 5 to 35 being set from a build-time-
|
|
61
|
+
// programmable block.
|
|
62
|
+
`define MGMT_INIT 1'b0
|
|
63
|
+
`define OENB_INIT 1'b0
|
|
64
|
+
`define DM_INIT 3'b001
|
|
65
|
+
|
|
66
|
+
`endif // __GLOBAL_DEFINE_H
|