Skip to content

Commit c3305dc

Browse files
authored
Merge pull request #173 from antmicro/clocking_block
Fail on unsupported vpiClockingBlock
2 parents d5aa5b9 + be5aca6 commit c3305dc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

uhdm-plugin/UhdmAst.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ void UhdmAst::process_module()
11641164
}
11651165
});
11661166
visit_one_to_many({vpiModule, vpiInterface, vpiTaskFunc, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray,
1167-
vpiContAssign, vpiProcess},
1167+
vpiContAssign, vpiProcess, vpiClockingBlock},
11681168
obj_h, [&](AST::AstNode *node) {
11691169
if (node) {
11701170
if (node->type == AST::AST_ASSIGN && node->children.size() < 2)
@@ -3400,6 +3400,12 @@ void UhdmAst::process_while()
34003400
});
34013401
}
34023402

3403+
void UhdmAst::process_unsupported_stmt(const UHDM::BaseClass *object)
3404+
{
3405+
log_error("%s:%d: Currently not supported object of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(),
3406+
UHDM::VpiTypeName(obj_h).c_str());
3407+
}
3408+
34033409
AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle)
34043410
{
34053411
obj_h = obj_handle;
@@ -3618,6 +3624,9 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle)
36183624
case vpiWhile:
36193625
process_while();
36203626
break;
3627+
case vpiClockingBlock:
3628+
process_unsupported_stmt(object);
3629+
break;
36213630
case vpiProgram:
36223631
default:
36233632
report_error("%s:%d: Encountered unhandled object '%s' of type '%s'\n", object->VpiFile().c_str(), object->VpiLineNo(),

uhdm-plugin/UhdmAst.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class UhdmAst
134134
void process_while();
135135
void simplify_parameter(AST::AstNode *parameter, AST::AstNode *module_node = nullptr);
136136
void process_nonsynthesizable(const UHDM::BaseClass *object);
137+
void process_unsupported_stmt(const UHDM::BaseClass *object);
137138
void visitEachDescendant(AST::AstNode *node, const std::function<void(AST::AstNode *)> &f);
138139

139140
UhdmAst(UhdmAst *p, UhdmAstShared &s, const std::string &i) : parent(p), shared(s), indent(i)

0 commit comments

Comments
 (0)