Skip to content

Commit

Permalink
[ipemu] rename cosim_init -> t1_cosim_init
Browse files Browse the repository at this point in the history
  • Loading branch information
FanShupei authored and sequencer committed Jul 22, 2024
1 parent fae2ef1 commit a036b57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions difftest/online_dpi/src/dpi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ unsafe extern "C" fn axi_write_indexedAccessPort(
}

#[no_mangle]
unsafe extern "C" fn cosim_init() {
unsafe extern "C" fn t1_cosim_init() {
let args = OfflineArgs::parse();
args.common_args.setup_logger().unwrap();

let driver = Box::new(Driver::new(&args));
let mut dpi_target = DPI_TARGET.lock().unwrap();
assert!(
dpi_target.is_none(),
"cosim_init should be called only once"
"t1_cosim_init should be called only once"
);
*dpi_target = Some(driver);
}
Expand Down
4 changes: 2 additions & 2 deletions ipemu/src/TestBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class TestBench(generator: SerializableModuleGenerator[T1, T1Parameter]) extends
|`endif
| endfunction;
|
| import "DPI-C" function void cosim_init();
| import "DPI-C" function void t1_cosim_init();
| initial begin
| cosim_init();
| t1_cosim_init();
| clock = 1'b0;
| reset = 1'b1;
| end
Expand Down

0 comments on commit a036b57

Please sign in to comment.