• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. VerilogA End of File

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 125
  • Views 7601
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VerilogA End of File

KhanAmir
KhanAmir over 3 years ago

Hi, 

I am reading data from a file which contains the pixel values of column of image. I am performing the transient analysis using spectre to get the output (out here) at each time event. I have tried, just to check, different length of simulations but the response is same as shown in the attached figure. Also, simulation does not stop and continue. Please help.

// VerilogA for Verilog_A, data_readout, veriloga

`include "constants.vams"
`include "disciplines.vams"

module module_filereader (out);

output out;
electrical out;

parameter real period = 1/10k;
parameter integer maxcount = 480;

integer dataread, cnt;
real mydata1, mydata2;
real datacol [maxcount-1:0];

analog begin

@(initial_step("tran")) begin
cnt = 0;
dataread = $fopen("/../One_column_image1.csv","r"); //opening file readable access
end

@(timer(0, period )) begin
cnt = cnt+1;
end

while( cnt < maxcount ) begin
mydata1 = $fscanf(dataread,"%f", datacol[cnt]);
// mydata1 = $fscanf(dataread,"%f",cnt);

end
$debug("\nThe value of variable mydata1 is %f",mydata1);


@(final_step) $fclose(dataread);

V(out) <+ transition(mydata1, 1n, 1n, 1n);

end

endmodule

/resized-image/__size/1280x960/__key/communityserver-discussions-components-files/38/No_5F00_error.png

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information