Canonicalize param env before codegen #187
Labels
A-codegen
Area: Code generation.
C-enhancement
Category: Adding or improving on features.
L-vlog
Language: Verilog and SystemVerilog.
Codegen currently uses the
ParamEnv
to determine if two modules have the same parametrization. However, since most parameters are indirectly bound, i.e., they depend on outer parameters, these param envs look distinct in many cases, even though they will resolve to the exact same parametrization. To fix this, codegen should "canonicalize" the param envs, which would mean going through the param env data, converting each binding to aDirect
one with the concrete value/type, and interning this as new param env. Then use this canonical param env for code generation.Todo
canonical_param_type
andcanonical_param_value
query, which resolves one paramcanonical_param_env
query which creates a canonicalized param envThe text was updated successfully, but these errors were encountered: