Guest User

Untitled

a guest
Apr 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. module file_read();
  2. integer fd,fd1,file_char,status;
  3. logic [7:0] captured_data;
  4.  
  5. initial begin
  6. fd = $fopen("input_file", "rb");
  7. fd1 =$fopen("write_file","w");
  8. status=$fseek(fd,1872,0);
  9.  
  10. assert (status);
  11. // while ($fgetc(fd) != `EOF) begin
  12. while (!$feof(fd)) begin
  13. file_char=$fgetc(fd);
  14. $display("file char is %h",file_char);
  15. end
  16. end // initial begin
Add Comment
Please, Sign In to add comment