Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted lowrisc_prim_abstract_xx RTL files #98

Open
NagaHimanshu opened this issue Feb 22, 2024 · 5 comments
Open

Corrupted lowrisc_prim_abstract_xx RTL files #98

NagaHimanshu opened this issue Feb 22, 2024 · 5 comments

Comments

@NagaHimanshu
Copy link

Hi, I am building the Ibex demo system in windows and successfully built the software. While running the command for synthesis

fusesoc --cores-root=. run --target=synth --setup --build lowrisc:ibex:demo_system

The output from command-line is as in the attached file - cmd_output.txt

This generated the prim_xx.sv files that are corrupted and providing syntax errors. I am attaching two of such generated files (uploading copied txt files since sv files cannot be uploaded) -
prim_and2.txt
prim_buf.txt

Could you please assist me with this issue?

@NagaHimanshu
Copy link
Author

I found the issue, that, the files generated using verible parser created problem whereas, that of regex parser are proper. Is there any way, that by default to bypass the verible parser without much modification to the code?

@marnovandermaas
Copy link
Contributor

Yes, those files don't look good to me.

Here's an example of my generated prim_and2.sv:

// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file is auto-generated.
// Used parser: Verible

`ifndef PRIM_DEFAULT_IMPL
  `define PRIM_DEFAULT_IMPL prim_pkg::ImplGeneric
`endif

// This is to prevent AscentLint warnings in the generated
// abstract prim wrapper. These warnings occur due to the .*
// use. TODO: we may want to move these inline waivers
// into a separate, generated waiver file for consistency.
//ri lint_check_off OUTPUT_NOT_DRIVEN INPUT_NOT_READ HIER_BRANCH_NOT_READ
module prim_and2

#(
parameter int Width = 1
) (
  input        [Width-1:0] in0_i,
  input        [Width-1:0] in1_i,
  output logic [Width-1:0] out_o
);
  parameter prim_pkg::impl_e Impl = `PRIM_DEFAULT_IMPL;

if (Impl == prim_pkg::ImplXilinx) begin : gen_xilinx
    prim_xilinx_and2 #(
      .Width(Width)
    ) u_impl_xilinx (
      .*
    );
end else begin : gen_generic
    prim_generic_and2 #(
      .Width(Width)
    ) u_impl_generic (
      .*
    );
end

endmodule
//ri lint_check_on OUTPUT_NOT_DRIVEN INPUT_NOT_READ HIER_BRANCH_NOT_READ

@marnovandermaas
Copy link
Contributor

Are you running on Windows Subsystem for Linux?

@marnovandermaas
Copy link
Contributor

@NagaHimanshu
Copy link
Author

I am building it for Windows using command-line, not in WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants