integer file;
initial begin
// 파일 열기 (쓰기 모드)
file = $fopen("output.txt", "w");
if (!file) $display("Error: Cannot open file.");
end
always @(M_AXIS_TVALID or M_AXIS_TDATA) begin
if (M_AXIS_TVALID) begin
// 파일에 데이터 쓰기
$fwrite(file, "%x\n",M_AXIS_TDATA);
end
end
'Quality control (1) > Verilog' 카테고리의 다른 글
Verilog - LFSR( Linear feedback shift register ) / Fibonacci & Galois LFSR (0) | 2023.05.23 |
---|---|
Verilog - Finite State Machine (FSM) / Lemming Game (0) | 2023.05.17 |
Verilog - 4bit Ripple Carry Adder (0) | 2023.03.21 |
Verilog - Synthesis (full_adder_dataflow) / LUT / truth table (2) | 2023.03.20 |
Verilog - mux4_to_1 & test bench (0) | 2023.03.16 |