mirror of https://github.com/YosysHQ/yosys.git
Compare commits
6 Commits
d3502dcc2b
...
aca89c477e
Author | SHA1 | Date |
---|---|---|
N. Engelhardt | aca89c477e | |
Miodrag Milanović | 29e8812bab | |
Miodrag Milanović | 9512ec4bbc | |
Miodrag Milanovic | d6bd521487 | |
N. Engelhardt | df72f30141 | |
Miodrag Milanovic | df391f5816 |
|
@ -2126,12 +2126,6 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
|
||||||
log(" assert condition %s.\n", log_signal(cond));
|
log(" assert condition %s.\n", log_signal(cond));
|
||||||
|
|
||||||
Cell *cell = module->addAssert(new_verific_id(inst), cond, State::S1);
|
Cell *cell = module->addAssert(new_verific_id(inst), cond, State::S1);
|
||||||
// Initialize FF feeding condition to 1, in case it is not
|
|
||||||
// used by rest of design logic, to prevent failing on
|
|
||||||
// initial uninitialized state
|
|
||||||
if (cond.is_wire() && !cond.wire->name.isPublic())
|
|
||||||
cond.wire->attributes[ID::init] = Const(1,1);
|
|
||||||
|
|
||||||
import_attributes(cell->attributes, inst);
|
import_attributes(cell->attributes, inst);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -3428,6 +3422,7 @@ struct VerificPass : public Pass {
|
||||||
RuntimeFlags::SetVar("veri_preserve_assignments", 1);
|
RuntimeFlags::SetVar("veri_preserve_assignments", 1);
|
||||||
RuntimeFlags::SetVar("veri_preserve_comments", 1);
|
RuntimeFlags::SetVar("veri_preserve_comments", 1);
|
||||||
RuntimeFlags::SetVar("veri_preserve_drivers", 1);
|
RuntimeFlags::SetVar("veri_preserve_drivers", 1);
|
||||||
|
RuntimeFlags::SetVar("veri_create_empty_box", 1);
|
||||||
|
|
||||||
// Workaround for VIPER #13851
|
// Workaround for VIPER #13851
|
||||||
RuntimeFlags::SetVar("veri_create_name_for_unnamed_gen_block", 1);
|
RuntimeFlags::SetVar("veri_create_name_for_unnamed_gen_block", 1);
|
||||||
|
|
|
@ -78,7 +78,7 @@ struct SynthQuickLogicPass : public ScriptPass {
|
||||||
}
|
}
|
||||||
|
|
||||||
string top_opt, blif_file, edif_file, family, currmodule, verilog_file, lib_path;
|
string top_opt, blif_file, edif_file, family, currmodule, verilog_file, lib_path;
|
||||||
bool abc9, inferAdder, nobram, bramTypes, dsp;
|
bool abc9, inferAdder, nobram, bramTypes, dsp, flatten;
|
||||||
|
|
||||||
void clear_flags() override
|
void clear_flags() override
|
||||||
{
|
{
|
||||||
|
@ -94,6 +94,7 @@ struct SynthQuickLogicPass : public ScriptPass {
|
||||||
bramTypes = false;
|
bramTypes = false;
|
||||||
lib_path = "+/quicklogic/";
|
lib_path = "+/quicklogic/";
|
||||||
dsp = true;
|
dsp = true;
|
||||||
|
flatten = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_scratchpad_defaults(RTLIL::Design *design) {
|
void set_scratchpad_defaults(RTLIL::Design *design) {
|
||||||
|
@ -158,6 +159,10 @@ struct SynthQuickLogicPass : public ScriptPass {
|
||||||
dsp = false;
|
dsp = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (args[argidx] == "-noflatten") {
|
||||||
|
flatten = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
extra_args(args, argidx, design);
|
extra_args(args, argidx, design);
|
||||||
|
@ -202,7 +207,8 @@ struct SynthQuickLogicPass : public ScriptPass {
|
||||||
|
|
||||||
if (check_label("prepare")) {
|
if (check_label("prepare")) {
|
||||||
run("proc");
|
run("proc");
|
||||||
run("flatten");
|
if (flatten)
|
||||||
|
run("flatten", "(unless -noflatten)");
|
||||||
if (help_mode || family == "pp3") {
|
if (help_mode || family == "pp3") {
|
||||||
run("tribuf -logic", " (for pp3)");
|
run("tribuf -logic", " (for pp3)");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
verific -sv -lib <<EOF
|
||||||
|
module TEST_CELL(input clk, input a, input b, output reg c);
|
||||||
|
parameter PATH = "DEFAULT";
|
||||||
|
always @(posedge clk) begin
|
||||||
|
if (PATH=="DEFAULT")
|
||||||
|
c <= a;
|
||||||
|
else
|
||||||
|
c <= b;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
EOF
|
||||||
|
|
||||||
|
verific -sv <<EOF
|
||||||
|
module top(input clk, input a, input b, output c, output d);
|
||||||
|
TEST_CELL #(.PATH("TEST")) test1(.clk(clk),.a(a),.b(1'b1),.c(c));
|
||||||
|
TEST_CELL #(.PATH("DEFAULT")) test2(.clk(clk),.a(a),.b(1'bx),.c(d));
|
||||||
|
endmodule
|
||||||
|
EOF
|
||||||
|
|
||||||
|
verific -import top
|
||||||
|
hierarchy -top top
|
||||||
|
stat
|
||||||
|
select -assert-count 2 t:TEST_CELL
|
Loading…
Reference in New Issue