pub fn entity_code(
entity: &Codegenable,
instance_map: &mut InstanceMap,
source_code: &Option<CodeBundle>,
) -> (Code, VerilogNameMap)
Expand description
Source code is used for two things: mapping expressions back to their original source code location, and for assertions. If source_code is None, no (* src = *) attributes will be emitted, however, assertions will cause a panic. This is convenient for tests where specifying source location is annoying to specify. In actual compilation this should be Some
Before prerforming codegen, prepare_codegen
should be run