Skip to content

Commit

Permalink
Add check for clock type in CoreIR compilation
Browse files Browse the repository at this point in the history
Similar to what we do for AysncReset types, we make a special case to be
able to wire constants to clocks.
  • Loading branch information
rsetaluri committed Sep 18, 2018
1 parent 877eb1f commit 4aa20ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions magma/backend/coreir_.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def compile_instance(self, instance, module_definition):
for name, value in type(instance).coreir_genargs.items():
if isinstance(value, AsyncResetKind):
value = self.context.named_types["coreir", "arst"]
elif isinstance(value, ClockKind):
value = self.context.named_types["coreir", "clk"]
gen_args[name] = value
gen_args = self.context.new_values(gen_args)
return module_definition.add_generator_instance(instance.name,
Expand Down

0 comments on commit 4aa20ef

Please sign in to comment.