use serde::{Deserialize, Serialize};
use xlsynth::vast_helpers_options::CodegenOptions;
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum Layout {
#[default]
None,
Pipeline,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(default, deny_unknown_fields)]
pub struct BlockCodegenOptions {
pub top: Option<String>,
pub layout: Layout,
pub module_name: Option<String>,
pub array_index_bounds_checking: bool,
pub separate_lines: bool,
pub max_inline_depth: usize,
pub emit_sv_types: bool,
pub emit_asserts: bool,
pub register_codegen_options: Option<CodegenOptions>,
}
impl Default for BlockCodegenOptions {
fn default() -> Self {
Self {
top: None,
layout: Layout::None,
module_name: None,
array_index_bounds_checking: true,
separate_lines: false,
max_inline_depth: 5,
emit_sv_types: true,
emit_asserts: true,
register_codegen_options: None,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BlockCodegenOutput {
pub system_verilog: String,
}