Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module file_read();
- integer fd,fd1,file_char,status;
- logic [7:0] captured_data;
- initial begin
- fd = $fopen("input_file", "rb");
- fd1 =$fopen("write_file","w");
- status=$fseek(fd,1872,0);
- assert (status);
- // while ($fgetc(fd) != `EOF) begin
- while (!$feof(fd)) begin
- file_char=$fgetc(fd);
- $display("file char is %h",file_char);
- end
- end // initial begin
Add Comment
Please, Sign In to add comment