1

I am trying to synthesize an IP Core from OpenCores.Org website written in verilog language which is AmberCPU. This project is just an implementation of a version of ARM Instruction Set Architecture. However, when I gradually add source files to my project tree and check whether there is a problem or not, at some point at a specific header file I get errors. The error reads like this "expecting 'EOF', found 'localparam'" and the file starts like below

// e.g. 24 for 32MBytes, 26 for 128MBytes
localparam MAIN_MSB             = 26; 

// e.g. 13 for 4k words
localparam BOOT_MSB             = 13;  

...

The file is not included in "automatic includes" neither it is defined as "global header".

So my question is that how can I solve this problem. Is that related to some kind of settings of Xilinx ISE that I could not realize yet or is it related to character encoding?

WhiteFlowers
  • 43
  • 11
  • And the `localparam` exists outside of a `module`? That doesn't seem right... – Patrick Roberts Jul 25 '17 at 21:43
  • This file is not a verilog file directly by itself, just a header file. Hence, as from my previous experience, there is no need for module definition. But I may be wrong. – WhiteFlowers Jul 25 '17 at 21:46
  • 1
    Apparently in SystemVerilog, you can have a `localparam` in other contexts besides `module`. See [this answer](https://stackoverflow.com/a/30288884/1541563). As to how to resolve your issue, I'm not sure though. Perhaps you should contact the original developer of the header files? Unless I'm misunderstanding, based on the context it sounds like you're getting these source files from some other project. – Patrick Roberts Jul 25 '17 at 21:47
  • it is also possible that your version of xilinx compiler does not support system verilog subset. you might need to upgrade. – Serge Jul 25 '17 at 22:23

0 Answers0