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

Generates VHDL with incorrect bit width assignment #187

Closed
kfish opened this issue Nov 24, 2016 · 0 comments
Closed

Generates VHDL with incorrect bit width assignment #187

kfish opened this issue Nov 24, 2016 · 0 comments

Comments

@kfish
Copy link

kfish commented Nov 24, 2016

Clash generates the following VHDL for some intermediate SFixed calculations.

  signal app_arg_1_app_arg  : signed(128 downto 0);
...
begin
  
  app_arg_1_app_arg <= signed'(x"000000000000000020000000000000000");

This fails in the Vivado 2015 simulator due to the width mismatch between the signal declaration (129 bits) and the literal assignment from 132 bits.

Modifying the generated code eg.

   signal app_arg_1_app_arg  : signed(128 downto 0);
   signal app_arg_1_app_arg_tmp  : signed(131 downto 0);
begin
  app_arg_1_app_arg_tmp <= signed'(x"000000000000000020000000000000000");
  app_arg_1_app_arg <=  app_arg_1_app_arg_tmp(128 downto 0);

simulates correctly.

@kfish kfish changed the title Synthesizes Generates VHDL with incorrect bit width assignment Nov 24, 2016
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

1 participant