data_src LFSR Configuration Not Reset

BP
Brian Padalino
Fri, Apr 17, 2020 4:02 AM

I am trying to add a new LFSR configuration to the data_src.hdl component.
The following is the configuration that I added to the build file:

<configuration id='2'> <parameter name="DATA_BIT_WIDTH_p" Value="16"/> <parameter name="LFSR_POLYNOMIAL_p" Value='1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0'/> <!-- x^16 + x^15 + x^13 + x^4 + 1(implied) --> <parameter name="LFSR_SEED_p" Value='1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1'/> <parameter name="ZLM_WHEN_NUM_SAMPLES_REACHED_p" Value="false"/> <parameter name='ODATA_WIDTH_p' value='16'/> </configuration>

My goal was to use the LFSR to feed into the msk_mapper, which is why I
wanted 16-bit input and output.

The problem I have is that I run into this synthesis issue:

ERROR: [Synth 8-690] width mismatch in assignment; target has 12 bits,
source has 16 bits

I look at the source and it's a line that looks like this:

LFSR_POLYNOMIAL_p    : in  std_logic_vector(12*(1)-1 downto 0) :=
ocpi.types.slv(Bool_array_t(work.data_src_constants.LFSR_POLYNOMIAL_p));

The really weird part is the 12 there.  Looking at the data_src-spec file,
the default width is DATA_BIT_WIDTH_p, which I've set to a value of 16.

So I tried switching the order of the configurations and it seems
DATA_BIT_WIDTH_p is sticky for all following configurations.  If I have a
16-bit starting configuration, I get a mismatch on building a 12-bit
configuration.

This is all in code generation, so I am not sure where to fix something
like this.  Guidance is appreciated.

Thanks,
Brian

I am trying to add a new LFSR configuration to the data_src.hdl component. The following is the configuration that I added to the build file: <configuration id='2'> <parameter name="DATA_BIT_WIDTH_p" Value="16"/> <parameter name="LFSR_POLYNOMIAL_p" Value='1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0'/> <!-- x^16 + x^15 + x^13 + x^4 + 1(implied) --> <parameter name="LFSR_SEED_p" Value='1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1'/> <parameter name="ZLM_WHEN_NUM_SAMPLES_REACHED_p" Value="false"/> <parameter name='ODATA_WIDTH_p' value='16'/> </configuration> My goal was to use the LFSR to feed into the msk_mapper, which is why I wanted 16-bit input and output. The problem I have is that I run into this synthesis issue: ERROR: [Synth 8-690] width mismatch in assignment; target has 12 bits, source has 16 bits I look at the source and it's a line that looks like this: LFSR_POLYNOMIAL_p : in std_logic_vector(12*(1)-1 downto 0) := ocpi.types.slv(Bool_array_t(work.data_src_constants.LFSR_POLYNOMIAL_p)); The really weird part is the 12 there. Looking at the data_src-spec file, the default width is DATA_BIT_WIDTH_p, which I've set to a value of 16. So I tried switching the order of the configurations and it seems DATA_BIT_WIDTH_p is sticky for all following configurations. If I have a 16-bit starting configuration, I get a mismatch on building a 12-bit configuration. This is all in code generation, so I am not sure where to fix something like this. Guidance is appreciated. Thanks, Brian
JD
Jerry Darko
Fri, Apr 17, 2020 2:33 PM

Brian,

I have you tried doing a make clean and then a rebuild?

  • Jerry

From: discuss discuss-bounces@lists.opencpi.org on behalf of Brian Padalino bpadalino@gmail.com
Sent: Friday, April 17, 2020 12:02 AM
To: discuss@lists.opencpi.org discuss@lists.opencpi.org
Subject: [Discuss OpenCPI] data_src LFSR Configuration Not Reset

I am trying to add a new LFSR configuration to the data_src.hdl component.
The following is the configuration that I added to the build file:

<configuration id='2'> <parameter name="DATA_BIT_WIDTH_p" Value="16"/> <parameter name="LFSR_POLYNOMIAL_p" Value='1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0'/> <!-- x^16 + x^15 + x^13 + x^4 + 1(implied) --> <parameter name="LFSR_SEED_p" Value='1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1'/> <parameter name="ZLM_WHEN_NUM_SAMPLES_REACHED_p" Value="false"/> <parameter name='ODATA_WIDTH_p' value='16'/> </configuration>

My goal was to use the LFSR to feed into the msk_mapper, which is why I
wanted 16-bit input and output.

The problem I have is that I run into this synthesis issue:

ERROR: [Synth 8-690] width mismatch in assignment; target has 12 bits,
source has 16 bits

I look at the source and it's a line that looks like this:

LFSR_POLYNOMIAL_p    : in  std_logic_vector(12*(1)-1 downto 0) :=
ocpi.types.slv(Bool_array_t(work.data_src_constants.LFSR_POLYNOMIAL_p));

The really weird part is the 12 there.  Looking at the data_src-spec file,
the default width is DATA_BIT_WIDTH_p, which I've set to a value of 16.

So I tried switching the order of the configurations and it seems
DATA_BIT_WIDTH_p is sticky for all following configurations.  If I have a
16-bit starting configuration, I get a mismatch on building a 12-bit
configuration.

This is all in code generation, so I am not sure where to fix something
like this.  Guidance is appreciated.

Thanks,
Brian

Brian, I have you tried doing a make clean and then a rebuild? - Jerry ________________________________ From: discuss <discuss-bounces@lists.opencpi.org> on behalf of Brian Padalino <bpadalino@gmail.com> Sent: Friday, April 17, 2020 12:02 AM To: discuss@lists.opencpi.org <discuss@lists.opencpi.org> Subject: [Discuss OpenCPI] data_src LFSR Configuration Not Reset I am trying to add a new LFSR configuration to the data_src.hdl component. The following is the configuration that I added to the build file: <configuration id='2'> <parameter name="DATA_BIT_WIDTH_p" Value="16"/> <parameter name="LFSR_POLYNOMIAL_p" Value='1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0'/> <!-- x^16 + x^15 + x^13 + x^4 + 1(implied) --> <parameter name="LFSR_SEED_p" Value='1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1'/> <parameter name="ZLM_WHEN_NUM_SAMPLES_REACHED_p" Value="false"/> <parameter name='ODATA_WIDTH_p' value='16'/> </configuration> My goal was to use the LFSR to feed into the msk_mapper, which is why I wanted 16-bit input and output. The problem I have is that I run into this synthesis issue: ERROR: [Synth 8-690] width mismatch in assignment; target has 12 bits, source has 16 bits I look at the source and it's a line that looks like this: LFSR_POLYNOMIAL_p : in std_logic_vector(12*(1)-1 downto 0) := ocpi.types.slv(Bool_array_t(work.data_src_constants.LFSR_POLYNOMIAL_p)); The really weird part is the 12 there. Looking at the data_src-spec file, the default width is DATA_BIT_WIDTH_p, which I've set to a value of 16. So I tried switching the order of the configurations and it seems DATA_BIT_WIDTH_p is sticky for all following configurations. If I have a 16-bit starting configuration, I get a mismatch on building a 12-bit configuration. This is all in code generation, so I am not sure where to fix something like this. Guidance is appreciated. Thanks, Brian
BP
Brian Padalino
Fri, Apr 17, 2020 2:56 PM

On Fri, Apr 17, 2020 at 10:33 AM Jerry Darko jerry.darko@cnftech.com
wrote:

Brian,

I have you tried doing a make clean and then a rebuild?

Yes, I believe so.  It's very reproducible for me.  Like I said, if I put
the 16-bit value first followed by 12-bit values, it builds the 16-bit ID
fine, then fails for the 12-bit values.  If I put a 12-bit value first, it
will build that just fine, but fail on the 16-bit value.

Also interestingly, if I put something with a build id of 2 before a build
id of 0, I get a crazy error.

Have you tried modifying your data_src with the extra build configuration
and been successful in building?

If so, what version of OpenCPI are you using?

Thanks,
Brian

On Fri, Apr 17, 2020 at 10:33 AM Jerry Darko <jerry.darko@cnftech.com> wrote: > Brian, > > I have you tried doing a make clean and then a rebuild? > Yes, I believe so. It's very reproducible for me. Like I said, if I put the 16-bit value first followed by 12-bit values, it builds the 16-bit ID fine, then fails for the 12-bit values. If I put a 12-bit value first, it will build that just fine, but fail on the 16-bit value. Also interestingly, if I put something with a build id of 2 before a build id of 0, I get a crazy error. Have you tried modifying your data_src with the extra build configuration and been successful in building? If so, what version of OpenCPI are you using? Thanks, Brian
JD
Jerry Darko
Fri, Apr 17, 2020 5:52 PM

Brian,

I was able to reproduce the bug as well. I tried this in a branch that was branched off of develop from a few weeks ago.

And yes, if the configuration id are not in numerical order it segfaults when building(I believe there is a ticket for it segfaulting).

Looks like this problem might reside in: opencpi/tools/ocpigen/src/hdl-worker.cxx


From: Brian Padalino bpadalino@gmail.com
Sent: Friday, April 17, 2020 10:56 AM
To: Jerry Darko jerry.darko@cnftech.com
Cc: discuss@lists.opencpi.org discuss@lists.opencpi.org
Subject: Re: [Discuss OpenCPI] data_src LFSR Configuration Not Reset

On Fri, Apr 17, 2020 at 10:33 AM Jerry Darko <jerry.darko@cnftech.commailto:jerry.darko@cnftech.com> wrote:
Brian,

I have you tried doing a make clean and then a rebuild?

Yes, I believe so.  It's very reproducible for me.  Like I said, if I put the 16-bit value first followed by 12-bit values, it builds the 16-bit ID fine, then fails for the 12-bit values.  If I put a 12-bit value first, it will build that just fine, but fail on the 16-bit value.

Also interestingly, if I put something with a build id of 2 before a build id of 0, I get a crazy error.

Have you tried modifying your data_src with the extra build configuration and been successful in building?

If so, what version of OpenCPI are you using?

Thanks,
Brian

Brian, I was able to reproduce the bug as well. I tried this in a branch that was branched off of develop from a few weeks ago. And yes, if the configuration id are not in numerical order it segfaults when building(I believe there is a ticket for it segfaulting). Looks like this problem might reside in: opencpi/tools/ocpigen/src/hdl-worker.cxx ________________________________ From: Brian Padalino <bpadalino@gmail.com> Sent: Friday, April 17, 2020 10:56 AM To: Jerry Darko <jerry.darko@cnftech.com> Cc: discuss@lists.opencpi.org <discuss@lists.opencpi.org> Subject: Re: [Discuss OpenCPI] data_src LFSR Configuration Not Reset On Fri, Apr 17, 2020 at 10:33 AM Jerry Darko <jerry.darko@cnftech.com<mailto:jerry.darko@cnftech.com>> wrote: Brian, I have you tried doing a make clean and then a rebuild? Yes, I believe so. It's very reproducible for me. Like I said, if I put the 16-bit value first followed by 12-bit values, it builds the 16-bit ID fine, then fails for the 12-bit values. If I put a 12-bit value first, it will build that just fine, but fail on the 16-bit value. Also interestingly, if I put something with a build id of 2 before a build id of 0, I get a crazy error. Have you tried modifying your data_src with the extra build configuration and been successful in building? If so, what version of OpenCPI are you using? Thanks, Brian