Inferring SRLs with INIT value
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Inferring SRLs with INIT value

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> FPGA
Author Message
Kevin Neilson
Guest





Posted: Wed Dec 15, 2004 11:58 pm    Post subject: Inferring SRLs with INIT value Reply with quote

Synplify now reads the defparam 'INIT' used for instantiated SRLs, so
you can initialize the value of the SRL16 for both simulation and
synthesis with a single defparam. However, I'm wondering if there is a
way to infer SRL16 Johnson rings or shift registers with an initial
value. This can be done with registers by setting the 'reset' value of
the register to the desired value, but you can't have a reset clause
with SRLs or they won't get inferred as SRLs. It would be nice to be
able to infer a Johnson ring because if you want to instantiate SRLs you
need to instantiate one for each 16 bits of the register which makes it
hard to parameterize it.
Back to top
Kevin Neilson
Guest





Posted: Thu Dec 16, 2004 1:23 am    Post subject: Re: Inferring SRLs with INIT value Reply with quote

Kevin Neilson wrote:
Quote:
Synplify now reads the defparam 'INIT' used for instantiated SRLs, so
you can initialize the value of the SRL16 for both simulation and
synthesis with a single defparam. However, I'm wondering if there is a
way to infer SRL16 Johnson rings or shift registers with an initial
value. This can be done with registers by setting the 'reset' value of
the register to the desired value, but you can't have a reset clause
with SRLs or they won't get inferred as SRLs. It would be nice to be
able to infer a Johnson ring because if you want to instantiate SRLs you
need to instantiate one for each 16 bits of the register which makes it
hard to parameterize it.

I also have another question: I put a register on the output of the SRL
to register the output. I assumed that the register would be placed in
the same slice as the SRL, but the placer puts them in different CLBs.
Why would it do that? -Kevin
Back to top
Ray Andraka
Guest





Posted: Thu Dec 16, 2004 4:43 am    Post subject: Re: Inferring SRLs with INIT value Reply with quote

Kevin Neilson wrote:

Quote:
Kevin Neilson wrote:

Synplify now reads the defparam 'INIT' used for instantiated SRLs, so
you can initialize the value of the SRL16 for both simulation and
synthesis with a single defparam. However, I'm wondering if there is
a way to infer SRL16 Johnson rings or shift registers with an initial
value. This can be done with registers by setting the 'reset' value
of the register to the desired value, but you can't have a reset
clause with SRLs or they won't get inferred as SRLs. It would be
nice to be able to infer a Johnson ring because if you want to
instantiate SRLs you need to instantiate one for each 16 bits of the
register which makes it hard to parameterize it.

No, you pretty much have to instance the SRLs to take advantage of

putting the inits on them. You might be able to do it from the UCF (I
never tried that), but that makes the simulation not match the
hardware. That said, be careful using just the SRL as a johnson
counter, because there is no way to reset it other than
reconfiguration...ie, it won't recover from an upset. Ken Chapman kind
of glosses over that fact in his dissertation on SRL16's.

Quote:
I also have another question: I put a register on the output of the
SRL to register the output. I assumed that the register would be
placed in the same slice as the SRL, but the placer puts them in
different CLBs. Why would it do that? -Kevin


Probably doing that because you're using the reset on the register. The
reset pin is not available if you are using the SRL in the same half-slice.

--
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930 Fax 401/884-7950
email ray@andraka.com
http://www.andraka.com

"They that give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety."
-Benjamin Franklin, 1759
Back to top
Kevin Neilson
Guest





Posted: Fri Dec 17, 2004 4:43 am    Post subject: Re: Inferring SRLs with INIT value Reply with quote

Ray Andraka wrote:
Quote:
Kevin Neilson wrote:

Kevin Neilson wrote:

Synplify now reads the defparam 'INIT' used for instantiated SRLs, so
you can initialize the value of the SRL16 for both simulation and
synthesis with a single defparam. However, I'm wondering if there is
a way to infer SRL16 Johnson rings or shift registers with an initial
value. This can be done with registers by setting the 'reset' value
of the register to the desired value, but you can't have a reset
clause with SRLs or they won't get inferred as SRLs. It would be
nice to be able to infer a Johnson ring because if you want to
instantiate SRLs you need to instantiate one for each 16 bits of the
register which makes it hard to parameterize it.


No, you pretty much have to instance the SRLs to take advantage of
putting the inits on them. You might be able to do it from the UCF (I
never tried that), but that makes the simulation not match the
hardware. That said, be careful using just the SRL as a johnson
counter, because there is no way to reset it other than
reconfiguration...ie, it won't recover from an upset. Ken Chapman kind
of glosses over that fact in his dissertation on SRL16's.

I also have another question: I put a register on the output of the
SRL to register the output. I assumed that the register would be
placed in the same slice as the SRL, but the placer puts them in
different CLBs. Why would it do that? -Kevin



Probably doing that because you're using the reset on the register. The
reset pin is not available if you are using the SRL in the same half-slice.

I didn't know that about the SRL--I guess I can leave the reset off of

the flop. It seems weird to do so but I guess it won't hurt anything.
How does the synthesizer know what the initial state is if there is no
reset clause?
-Kevin
Back to top
Ray Andraka
Guest





Posted: Fri Dec 17, 2004 6:01 pm    Post subject: Re: Inferring SRLs with INIT value Reply with quote

Kevin Neilson wrote:

Quote:

Probably doing that because you're using the reset on the register.
The reset pin is not available if you are using the SRL in the same
half-slice.

I didn't know that about the SRL--I guess I can leave the reset off of
the flop. It seems weird to do so but I guess it won't hurt anything.
How does the synthesizer know what the initial state is if there is no
reset clause?
-Kevin

The synthesizer doesn't 'know' the initial state. The initial state
defaults to '0' in Xilinx. In order to change that to a '1' you either
need an explicit (pre)set on the flip-flop (which you can't do if it is
to share a slice half with an SRL16), or you need to put an INIT=S
attribute on the flip-flop. That, I think, still requires the ff to be
instantiated rather than inferred.

--
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930 Fax 401/884-7950
email ray@andraka.com
http://www.andraka.com

"They that give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety."
-Benjamin Franklin, 1759
Back to top
Marc Randolph
Guest





Posted: Fri Dec 17, 2004 6:10 pm    Post subject: Re: Inferring SRLs with INIT value Reply with quote

Kevin Neilson wrote:
Quote:
Ray Andraka wrote:
Kevin Neilson wrote:

Synplify now reads the defparam 'INIT' used for instantiated
SRLs, so
you can initialize the value of the SRL16 for both simulation and

synthesis with a single defparam. However, I'm wondering if
there is
a way to infer SRL16 Johnson rings or shift registers with an
initial
value. This can be done with registers by setting the 'reset'
value
of the register to the desired value, but you can't have a reset
clause with SRLs or they won't get inferred as SRLs. It would be

nice to be able to infer a Johnson ring because if you want to
instantiate SRLs you need to instantiate one for each 16 bits of
the
register which makes it hard to parameterize it.


No, you pretty much have to instance the SRLs to take advantage of
putting the inits on them. You might be able to do it from the UCF
(I
never tried that), but that makes the simulation not match the
hardware. That said, be careful using just the SRL as a johnson
counter, because there is no way to reset it other than
reconfiguration...ie, it won't recover from an upset. Ken Chapman
kind
of glosses over that fact in his dissertation on SRL16's.
[...]
Probably doing that because you're using the reset on the register.
The
reset pin is not available if you are using the SRL in the same
half-slice.

I didn't know that about the SRL--I guess I can leave the reset off
of
the flop. It seems weird to do so but I guess it won't hurt
anything.
How does the synthesizer know what the initial state is if there is
no
reset clause?

Howdy Kevin,

To summarize what Ray said: the tools will see and use the INIT clause,
but you may have to instantiate the SRL in order to use the INIT. And
after the FPGA is loaded and running, there is no way to re-initialize
the SRL without reloading the whole part - UNLESS you put a special
reset circuit in front of your SRL to shift in a known value... which
might take up more resources than keeping the shift register in flops
to begin with.

Have fun,

Marc
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> FPGA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB