files.f Parsing

  • StevenAZ

    StevenAZ - 2011-08-29

    Hi Matthew,

    I followed your example, and created a project.  I looked at the project properties, and added my "files.f" file.  What do you do with that information?  Do you set the "top" design anywhere, if so how?  Also, it doesn't look like it is picking up:


    and my include files aren't being found.

  • Matthew Ballance

    Hi Steve,
        SVEditor uses the .f files to discover source files and include paths required to process them. Relative paths are processed relative to the .f file.
        SVEditor does not attempt to discover the design "top", but does determine relationships between packages/modules and included files to ensure that files are processed in order.

        One limitation of SVEditor's support for .f files is that, currently, SVEditor doesn't handle all possible simulator switches. Currently, it handles +incdir+/-incdir/-IN, +define+/-define/-DEF, single-line comments, and file paths. If your .f files contain other command-line switches that may be throwing SVEditor off…

        With your specific situation, are you specifying both the include paths and the file paths in the .f file? For example:

        This is the recommended approach.

        If you can provide a simplified example of what you're trying to do, I'm happy to have a look and see what's going wrong.

    Best Regards,

  • Escorial

    Escorial - 2011-09-05

    I think the following also could be the root  of the problem: the simulation looks for the files with relative names according to main simulation directory and Eclipse SV project might look for the file from the wrong starting point.

  • StevenAZ

    StevenAZ - 2011-09-06

    Thanks for getting back to me.  I took a look at what we have and found the following two constructs that may be causing problems.  In my files.f I call other files.f's.  I also use environment variables for paths (i.e. absolute paths). I defined PROJ_DIR to map to the correct location in the project page i.e. I set PROJ_DIR to point to the correct path in the "Linked Resources"  area of the project.

    -- excerpt from my top level files.f
    -f ${PROJ_DIR}/uart/uart.f

    When I "Refresh" my project (select project & hit F5) does the system parse through all the files in the .f file, or does it search through all the files in the hierarchy that houses the project. (Pardon me if this is something REALLY basic that I should already know, I am relatively new to Eclipse and am still finding my feet).

  • StevenAZ

    StevenAZ - 2011-09-06

    Below is a snippet of code that highlights a couple of syntax issues that aren't real.  The code itself is non-sensical, just snippets of stuff that I am getting on my "full project".

    module my_module #(  parameter PARAMETER_1 = 1, // this is parameter 1
                       parameter PARAMETER_2 = 10    // this is parameter 2
                                       input logic       clk    , // fixed 4MHz input clock
                                       input logic  write_enable, // write_enable
                                       input logic  read_enable, // read_enable
                                       input logic write_data , // write data
                                       output logic  read_data  // read data

    timeunit 1ns;            // ERROR: Not recognizing time
    timeprecision 1ps;            // ERROR not recognizing time

    logic  word_0;
    logic  word_1;

    localparam logic   TMR_SPB_ADDRL   = { 16'h1600, 16'h1400 };      // ERROR: Crazy parameter construct

       property read_and_write_not_back_to_back;
         @(posedge clk) write_enable  |=>
       endproperty      // ERROR: Doesn't recognize endproperty - expecting endmodule
       ap_read_and_write_not_back_to_back: assert property (read_and_write_not_back_to_back);
       cp_read_and_write_not_back_to_back: cover property (read_and_write_not_back_to_back);

  • StevenAZ

    StevenAZ - 2011-09-06

    Looks like `elsif is also not supported:

    `ifdef BOB
      assign a=b+c;
    `elsif BOB2
    assign a = b-c;

  • StevenAZ

    StevenAZ - 2011-09-06

    Please ignore the above `elsif comment.  I do have problems with it, but am unable to replicate the problem in something as simple as what I have shown above.

  • Matthew Ballance

    Hi Steve,

    Okay, I'm starting to get a picture of the issues here… SVEditor does not currently support '-f' includes within a .f file, so the included .f file isn't being processed.

    Based on your posts above, I see a few bug reports and enhancement requests:
    -  Support -f switches in .f files
    -  SVEditor needs to support `elsif (it doesn't currently)
    -  Parse error on 'property' statement

    It would be best if you file these enhancement requests and bug reports. That way, you'll get notifications when the issues are resolved. Let me know if you'd prefer not to file these, and I'll file them myself.

    Best Regards,

  • StevenAZ

    StevenAZ - 2011-09-16

    I'll file them.  Give me a bit.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks