mirror of https://github.com/YosysHQ/yosys.git
Test new Tcl methods
This commit is contained in:
parent
cba9460cba
commit
23922faecc
|
@ -0,0 +1,16 @@
|
|||
yosys read_verilog tcl_apis.v
|
||||
|
||||
if {[rtlil::get_attr -string -mod top foo] != "bar"} {
|
||||
error "bad top module attribute"
|
||||
}
|
||||
|
||||
if {[rtlil::get_attr -bool top w dont_touch] != 1} {
|
||||
error "bad w wire attribute"
|
||||
}
|
||||
|
||||
if {[rtlil::get_param -int top inst PARAM] != 4} {
|
||||
error "bad parameter"
|
||||
}
|
||||
|
||||
rtlil::set_attr -true -mod top marked
|
||||
yosys select -assert-any A:marked
|
|
@ -0,0 +1,11 @@
|
|||
module m;
|
||||
parameter PARAM = 0;
|
||||
endmodule
|
||||
|
||||
(* foo="bar" *)
|
||||
module top;
|
||||
(* dont_touch *)
|
||||
wire w;
|
||||
|
||||
m #(.PARAM(4)) inst();
|
||||
endmodule
|
|
@ -0,0 +1 @@
|
|||
yosys tcl tcl_apis.tcl
|
Loading…
Reference in New Issue