EDK : FSL macros defined by Xilinx are wrong

in your code, the value of synch_found is never reset after it has found the
first synchronisation byte...
Ben




"Weddick" <weddick@comcast.net> wrote in message
news:I_adnfHl47DWIR_fRVn-3A@comcast.com...
I have what I thought was a simple problem. I need to count the number of
clocks to determine when to take data out of the shift register. The data
is a continuous stream and I want to be able to count every 8 bits. I
thought I could use a 3 bit counter but can't seem to get the code correct.
I then went to a 4 bit counter, and while it works I am not sure if the
code is the best way. Any ideas?

Thanks,
Joel
 
And having said that... you've got to be sure of your clock
synchronisation...
i.e. the synchronisation bewteen SYS_CLK and SIO_CLK

Hmm, and one other thing, i'd use numeric_std and make BC a Natural..

HTH,
Ben

"Benjamin Todd" <benjamin.toddREMOVEALLCAPITALS@cernREMOVEALLCAPITALS.ch>
wrote in message news:d6004v$kk5$1@sunnews.cern.ch...
in your code, the value of synch_found is never reset after it has found
the first synchronisation byte...
Ben




"Weddick" <weddick@comcast.net> wrote in message
news:I_adnfHl47DWIR_fRVn-3A@comcast.com...
I have what I thought was a simple problem. I need to count the number of
clocks to determine when to take data out of the shift register. The data
is a continuous stream and I want to be able to count every 8 bits. I
thought I could use a 3 bit counter but can't seem to get the code
correct. I then went to a 4 bit counter, and while it works I am not sure
if the code is the best way. Any ideas?

Thanks,
Joel
 
On Wed, 01 Jun 2005 16:21:36 +1200, Terry Given <my_name@ieee.org>
wrote:

John Larkin wrote:
On Wed, 01 Jun 2005 00:44:18 GMT, Joerg
notthisjoergsch@removethispacbell.net> wrote:


Hello John,

Skolnik's "Radar Handbook" has some I/Q error budgeting in chapter 3 but
I don't think it'll suffice here. I have never seen a book that goes
this far into practical matters on Hilbert (except for the analog
version), maybe too small a market for publishers. If there is anything
out there it'll be most likely for Doppler applications.

Artech House may have some good stuff and you could check them. Most
books about transforms come with a CD full of helpful routines but often
they will be plain C code:

http://www.artechhouse.com/default.asp?Frame=Book.asp&Book=C5P10&Country=&Continent=ME&State=

Possibly you could start at one of the math simulator vendors, like here:

http://www.mathworks.com/access/helpdesk/help/toolbox/signal/filterd9.html

Simulators are almost a must when doing this kind of stuff. My turf is
med imaging and there usually every company invents the wheel again,
simulates until smoke comes out of the PC and then it all becomes a
trade secret. They rarely publish.

What do you want to do? Does it have to be poured into the FPGA?



Suppose I have an AC power system, and I can digitize a pair of
voltage and current waveforms. I want to report everything: trms
volts/amps, true power, reactive power, phase angle. The line
frequency could vary from maybe 20 to 80 Hz for a stationary
generator, or 200-800 for an aircraft system (including startup and
weird situations.) I'll digitize to 16 bits, at maybe 20K
samples/second or something. I'm considering doing all the signal
processing in an FPGA, crunching maybe 8 voltage+current pairs.

For the rms volts/amps, we could just square the samples, filter, and
allow my pokey uP to occasionally pick up that and square root.

True power is just the product of the e*i samples, lowpass filtered.
Easy.

What's tricky is the reactive power/phase angle thing. The ideal thing
would be to delay the voltage samples 90 degrees and then multiply by
the current samples, then filter to get the signed reactive power. The
trick is to delay the voltage sample data stream 90 degrees. A
discrete (fir) Hilbert would give me the phase-shifted voltage signal
(actually 135 deg, not 90, so I'd have to delay the current samples,
too, but that's OK.) I just need to quantify how good a given
implementation might be.

The other way to do it would be to use a fifo clocked at a multiple of
the waveform frequency, delaying the voltage or current samples by 90
degrees. That would take a digital PLL to track the voltage waveform
frequency and generate a 128x or something tracking clock. Maybe a
dds/nco clock gen with some fancy digital phase detector? That's
complex, too, but has the advantage of acquiring the waveform
frequency essentially for free. I could have a range bit the user sets
for the 60 vs 400 Hz situations, so I'd only need about a 4:1 tracking
range on the clock.

Either way, it sounds like I'm in for some simulation. PowerBasic!


John

why not a synchronous demodulator (or lock-in amp ;)

if you have 3 phases, its trivial. measure all 3 phases, and do a 3-2
phase transform to create an equivalent rotating vector a + jb. for a
single-phase system, build a 90 degree phase shifter so you have
Vpeak*sin(theta) + j*Vpeak*cos(theta).

then multiply by exp(-jtheta) (decompose into real & imaginary calcs)

You will then get 2 outputs, call them Vd and Vq. If you have a pure
sinusoidal system, and theta = integral(w_line.dt) is the correct phase,
one of these will be zero. Use this as the feedback to a PI controller,
whose reference is zero. PI output has ideal line frequency added to it
(if you want, not necessary) and is then integrated to produce theta.

once it syncs up, you have your real & imaginary V,I components in the
stationary reference frame, IOW they are DC quantities. easy to figure
out reactive power etc.

Cheers
Terry
The only tricky part here is the "once it syncs up" bit.

John
 
Well I found out what the error was and thought of sharing it anyway :)

http://www.xilinx.com/xlnx/xil_ans_printfriendly.jsp?getPagePath=18626&BV_SessionID=@@@@2078588891.1118659968@@@@&BV_EngineID=ccccaddelghkdlicefeceihdffhdfjf.0

Joey


"Joey" <johnsons@kaiserslautern.de> schrieb im Newsbeitrag
news:d8c9sd$kni$1@news.uni-kl.de...
Hi,

Recently I was trying to implement a plb peripheral. I made a plb
peripheral
device using the "Create/Import Peripheral" utility and edited the
user_logic.vhd file according to what I needed. I didn't forget to Import
the peripheral after editing.
Now here is the problem. When I used this peripheral in XPS and generated
the netlist, it gave me the following error and exited.


XST synthesis
plb_decoder_0_wrapper (plb_decoder_0) -
E:\Test\xps_decoder\try01\system.mhs:63
- Running XST synthesis
ERROR:Xst:813 -

E:/Test/xps_decoder/try01/pcores/plb_decoder_v1_00_a/hdl/vhdl/user_logic.vhd
line 53: Body of function UNSIGNED_NUM_BITS not found.
ERROR:MDT - HDL synthesis failed!
INFO:MDT - Refer to
E:\Test\xps_decoder\try01\synthesis\plb_decoder_0_wrapper_xst.srp for
details
ERROR:MDT - platgen failed with errors!
make: *** [implementation/reset_block_wrapper.ngc] Error 2
Done.

The plb_decoder_0_wrapper_xst.srp fiel doesn't say much either. It just
exits where it enters the user_logic.vhd file after the library
declarations. I am also giving a part of the .pao file where all my files
listed can be seen:

lib plb_decoder_v1_00_a support_4M_pk
lib plb_decoder_v1_00_a parameter_4M_pk
lib plb_decoder_v1_00_a derived_param_4M_pk
lib plb_decoder_v1_00_a types_4M_pk
lib plb_decoder_v1_00_a Bit_Node <== UNSIGNED_NUM_BITS is in this
file
lib plb_decoder_v1_00_a Shuffle_controller
lib plb_decoder_v1_00_a barrel_shift
lib plb_decoder_v1_00_a decoder_4M_top
lib plb_decoder_v1_00_a generic_dual_port_ram
lib plb_decoder_v1_00_a serialnode
lib plb_decoder_v1_00_a top_interface
lib plb_decoder_v1_00_a user_logic
lib plb_decoder_v1_00_a plb_decoder

I have the above mentioned function in my Bit_Node (.vhd) file which also
accesses all those 4 packages already mentioned in the first 4 lines. Can
anybody help me ?

Joey
 
what is the width of your polynomial. Is it -7 to +4....

"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bb65e4@news.starhub.net.sg...
My polynomial is S(x) = x(-7) + x(04) + 1, but my input data is one byte
each clock period. What are the equations to inplement this data
scrambler?


Thanks.
 
I am just giving a general hint, should be applicable to your case also
after some changes

What you do is to tap the x7 and x4 bit of polynomial and XOR it with the
bit 0 of incoming data stream. The xored value is your output bit 0. Then
DEPENDING upon the protocol, you may either push in the output bit to msb
position of polynomail and shift all other bits of polynomial either right
or left depending upon your direction convention.

Repeat the above process each input bit....


"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bba2e8@news.starhub.net.sg...
Sorry typo, should be S(x) = x(-7) + x(-4) + 1.
What is the method to do conversion?


"newsgroup" <skeffect@gmail.com> wrote in message
news:d9g6mk$9j$1@bunyip2.cc.uq.edu.au...
what is the width of your polynomial. Is it -7 to +4....

"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bb65e4@news.starhub.net.sg...
My polynomial is S(x) = x(-7) + x(04) + 1, but my input data is one
byte
each clock period. What are the equations to inplement this data
scrambler?


Thanks.
 
Sorry typo, should be S(x) = x(-7) + x(-4) + 1.
What is the method to do conversion?


"newsgroup" <skeffect@gmail.com> wrote in message
news:d9g6mk$9j$1@bunyip2.cc.uq.edu.au...
what is the width of your polynomial. Is it -7 to +4....

"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bb65e4@news.starhub.net.sg...
My polynomial is S(x) = x(-7) + x(04) + 1, but my input data is one byte
each clock period. What are the equations to inplement this data
scrambler?


Thanks.
 
yeah, if one has patience, one can derive each byte one by one.
I thought there must be some shortcut to this tideous process.



"newsgroup" <skeffect@gmail.com> wrote in message
news:d9g8ca$qkp$1@bunyip2.cc.uq.edu.au...
I am just giving a general hint, should be applicable to your case also
after some changes

What you do is to tap the x7 and x4 bit of polynomial and XOR it with the
bit 0 of incoming data stream. The xored value is your output bit 0. Then
DEPENDING upon the protocol, you may either push in the output bit to msb
position of polynomail and shift all other bits of polynomial either right
or left depending upon your direction convention.

Repeat the above process each input bit....


"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bba2e8@news.starhub.net.sg...
Sorry typo, should be S(x) = x(-7) + x(-4) + 1.
What is the method to do conversion?


"newsgroup" <skeffect@gmail.com> wrote in message
news:d9g6mk$9j$1@bunyip2.cc.uq.edu.au...
what is the width of your polynomial. Is it -7 to +4....

"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bb65e4@news.starhub.net.sg...
My polynomial is S(x) = x(-7) + x(04) + 1, but my input data is one
byte
each clock period. What are the equations to inplement this data
scrambler?


Thanks.
 
Kris,

definitely yo can do the whole process in one go.
For that either you have to write a simple program which tells you the bit
combinations or
since in your case, data is just 8 bits, so you can manually derive the
equation

But I guess, the synthesis tool will be doing the same thing for you, if you
just write everything in loop, can't guarantee but it should do so.....


"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bbaf85$1@news.starhub.net.sg...
yeah, if one has patience, one can derive each byte one by one.
I thought there must be some shortcut to this tideous process.



"newsgroup" <skeffect@gmail.com> wrote in message
news:d9g8ca$qkp$1@bunyip2.cc.uq.edu.au...
I am just giving a general hint, should be applicable to your case also
after some changes

What you do is to tap the x7 and x4 bit of polynomial and XOR it with the
bit 0 of incoming data stream. The xored value is your output bit 0. Then
DEPENDING upon the protocol, you may either push in the output bit to msb
position of polynomail and shift all other bits of polynomial either
right
or left depending upon your direction convention.

Repeat the above process each input bit....


"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bba2e8@news.starhub.net.sg...
Sorry typo, should be S(x) = x(-7) + x(-4) + 1.
What is the method to do conversion?


"newsgroup" <skeffect@gmail.com> wrote in message
news:d9g6mk$9j$1@bunyip2.cc.uq.edu.au...
what is the width of your polynomial. Is it -7 to +4....

"Kris Neot" <Kris.Neot@hotmail.com> wrote in message
news:42bb65e4@news.starhub.net.sg...
My polynomial is S(x) = x(-7) + x(04) + 1, but my input data is one
byte
each clock period. What are the equations to inplement this data
scrambler?


Thanks.
 
newsgroup wrote:
Kris,

definitely yo can do the whole process in one go.
For that either you have to write a simple program which tells you the bit
combinations or
since in your case, data is just 8 bits, so you can manually derive the
equation

But I guess, the synthesis tool will be doing the same thing for you, if you
just write everything in loop, can't guarantee but it should do so.....
Yes, it works. I have made scramblers that way (in VHDL). It should
also be possible in Verilog, assuming your tool implements the 2001
version of the language.

Regards,
Allan
 
yeah, if one has patience, one can derive each byte one by one.
I thought there must be some shortcut to this tideous process.
Are you trying to understand how it works or looking for a
simple recipe for getting the job done?

I don't know of a simple recipe. I think there was a web
site that may have generated VHDL/Verilog for CRCs. I forget.
It was a long time ago. It might have done the parallel mode.

The software guys often do CRC calculations a byte at a time
rather than a bit at a time. You can probably find a lot
of good info via google. Basically, it involves a table
lookup. The length of the table is the size of your "byte".
The width of the table is the width of the polynomial used
to make your CRC. To do the normal CRC-32 (Ethernet) CRC
a byte at a time takes a 256 entry table where each entry
is 4 bytes wide.

You can implement that table in hardware with a cloud of XOR
gates. Some of the software routines compute the table
at initialization time rather than pre-computing it and
feeding a table of constants to the compiler. That tells you
the cloud of gates that you need. (I think.)

There are many ways to screwup CRC/scrambler calculations.
The common ones are getting left/right mixed up. I strongly
suggest checking things ahead of time with software/simulations.

--
The suespammers.org mail server is located in California. So are all my
other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's. I hate spam.
 
Jim Thompson wrote:
On Thu, 4 Aug 2005 07:59:08 -0400, "Clay S. Turner"
Physics@Bellsouth.net> wrote:
Yes, But certainly not the one who made P4's slower than P3's, for
numerical operations.
Isn't that clock for clock? My understanding was that they had to make
architectural changes in order to be able to run the things at a higher
frequency..

JEremy
 
Jeremy Stringer wrote:

Jim Thompson wrote:
On Thu, 4 Aug 2005 07:59:08 -0400, "Clay S. Turner"
Physics@Bellsouth.net> wrote:
Yes, But certainly not the one who made P4's slower than P3's, for
numerical operations.

Isn't that clock for clock? My understanding was that they had to make
architectural changes in order to be able to run the things at a higher
frequency..

JEremy
Either that, or Intel employed more of the cheap workforce, relied heavily
on automated tools and procedures and used less of the expensive brains.

Adrian
 
Thomas Magma wrote:
Let me give you a bit of back ground then. I am really pushed for space.
I need different clock frequencies thru-out my board. My highest frequency
is a Fox RFXO running around a GHz. I would like to derive all other clocks
from this one if possible. Next lowest frequency is around 80 MHz. Then a
few after that. I hate PLLs and I don't want a bunch a xtals on my board. So
I thought I would just divide down from my highest frequency. One chip
solution would be the best.
[.dsp removed. .fpga added]

These RfXOs are interesting devices, sub ps jitter, and 600-1.25GHz
clock out. Not cheap, but they do change the clock conventions.
Normally, you'd use a 80MHz xtal, and an RF synthesiser to create the
GHz region clock.


CPLDs can clock to some hundreds of MHz now, but none released can
get to > 600MHz.

Perhaps there will be enough demand for this type of GHz LVDS clock-in,
that we will see FPGA, or even CPLD, with IP cells designed to divide this ?

On present process, it is quite doable; you could not clock the FPGA
fabric at 0.6-1.25GHz, but you could divide from that, and get a phase
locked, low jitter FPGA clock(s) - if the IOcells were designed to
support it ?

-jg
 
I have been told that Virtex ( II to 4) the DCMs can divide down from a
GHz, if you use the divide-by-two prescle option in the DCM. That means
the DCM really runs on 500 MHz, which it is specified to do.
Division ( even combined multiply/divide) with numbers up to 32 is no
problem. You can multiply 500 MHz by 7 and divide by 27 (if those are
your numbers). The virtual 3.5 GHz are not really being generated, it's
all mathematical trickery. :)
For finer granularity, you can use DDS phase accumulators which,
however, generate som jitter (+ or - half a clock period).
Peter Alfke, Xilinx Applications
 
Peter Alfke wrote:
I have been told that Virtex ( II to 4) the DCMs can divide down from a
GHz, if you use the divide-by-two prescle option in the DCM. That means
the DCM really runs on 500 MHz, which it is specified to do.
Interesting - is that DIV 2 in the IO area, or in the DCM itself - in
which case, are there pin restrictions to drive at 1GHz ?

Division ( even combined multiply/divide) with numbers up to 32 is no
problem. You can multiply 500 MHz by 7 and divide by 27 (if those are
your numbers). The virtual 3.5 GHz are not really being generated, it's
all mathematical trickery. :)
What jitter spec, would the DCM give ?
assume sub 100MHz out, and 1GHz sub ps jitter IP .

For finer granularity, you can use DDS phase accumulators which,
however, generate som jitter (+ or - half a clock period).
Peter Alfke, Xilinx Applications
-jg
 
Jim,

Answers in the thread below,

Austin

Peter Alfke wrote:

I have been told that Virtex ( II to 4) the DCMs can divide down from a
GHz, if you use the divide-by-two prescle option in the DCM. That means
the DCM really runs on 500 MHz, which it is specified to do.


Interesting - is that DIV 2 in the IO area, or in the DCM itself - in
which case, are there pin restrictions to drive at 1GHz ?
In the DCM. Turns out the IOB is pretty good at receiving signals: V2
stops at 1.15 GHz typically. This is not well characterized, and you
are pretty much on your own here.

Division ( even combined multiply/divide) with numbers up to 32 is no
problem. You can multiply 500 MHz by 7 and divide by 27 (if those are
your numbers). The virtual 3.5 GHz are not really being generated, it's
all mathematical trickery. :)


What jitter spec, would the DCM give ?
assume sub 100MHz out, and 1GHz sub ps jitter IP .
For simple divide by 10, the jitter will be entirely from the tap
changes, which is ~50 ps tap in VII. Since +/- one tap is the
theoretical best one can do, and in practice, you may decide the change
the tap incorrectly, that makes three taps the minimum possible, and
also the maximum if there is no other jitter. That is 150 ps P-P period
jitter out of any output of the DCM, best case.

As a percentage of the period, 150 ps is not so bad at 100 MHz (10 ns,
or 10,000 ps). That is 150/10,000 of a unit interval jitter, or 1.5% UI
jitter.

For finer granularity, you can use DDS phase accumulators which,
however, generate som jitter (+ or - half a clock period).
Peter Alfke, Xilinx Applications


-jg
 
Hey

I've got 3 ebooks about systemc

-Synopsis rtl system
-systemc from the ground, an
-SoC design and verification using system

Just drop me an email at dima_turbiner[at]yahoo.com and I'll send the
to you (about 25 MB)

Good luck
Dimitr
 
Hi,
There are two main fpga manufacturers, Xilinx and Altera...Th
documentation provided with their free development tools hav
everything you need.A good start is to learn vhdl, then downloa
xilinx ISE7 ,then read the VHDL techniques in XST(synthesis tool
documentation ..then download a datasheet of the target devic
(Spartan 3, Virtex,..etc) ..then write code and compile and see ho
it's synthesized and how the resources are used..
 
Hw wrote:
Hi.

I need to digitize an array of signals (24) with minimum 8-bit
resolution, with < 2ms conversion time. Signals are single-ended 0 to
5V. I am trying to keep costs low, therefore I am trying to avoid
multiple A/Ds and/or complex multiplexing situations.

I know of the "slope" A/D technique of charging a capacitor or the
sigma-delta technique of using a PWM DAC and a comparator to form an
A/D.

Would it be possible to get the speed I want using either of those
techniques with an FPGA?
Silicon Labs have small uC that can do 32 Channel ADC, in 12 bit or 8
bit : they are 2.5V Max IP, so you'll need 2:1 dividers.

Any FPGA solution will not be very pin or external component efficent.
The FPGA can easily do the PWM / Counter side of any ADC, but you need
external divider, signal conditioning, and integration.

Most vanilla is a R-C-R charge balancing system,[needs 48 pins] but that
would struggle to give 8 bits, and be prone to FPGA supply noise.

Adding external analog SW will improve PSRR, and an external comparitor
would improve precision, but you can see on 24 channels, you are quickly
past a single chip uC.....

-jg
 

Welcome to EDABoard.com

Sponsor

Back
Top