Skip to content

Commit

Permalink
Move arrays back to type in codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum committed Jul 26, 2024
1 parent 499eb8d commit 3fcb6b0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/codegen_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ fn typ_to_declaration(mut typ: &ConcreteType, var_name: &str) -> String {
ConcreteType::Named(id) => {
let sz = get_type_name_size(*id);
if sz == 1 {
format!("logic {var_name}{array_string}")
format!("logic{array_string} {var_name}")
} else {
format!("logic[{}:0] {var_name}{array_string}", sz - 1)
format!("logic{array_string}[{}:0] {var_name}", sz - 1)
}
}
ConcreteType::Array(_) => unreachable!("All arrays have been used up already"),
Expand Down Expand Up @@ -93,6 +93,10 @@ impl<'g, 'out, Stream: std::fmt::Write> CodeGenerationContext<'g, 'out, Stream>
}
}

fn can_inline_assign(&self, wire: &RealWire) -> bool {

}

fn operation_to_string(&self, wire: &RealWire) -> String {
match &wire.source {
RealWireDataSource::Constant { value } => value.to_string(),
Expand Down

0 comments on commit 3fcb6b0

Please sign in to comment.