FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-06-2006, 09:34 PM
leaf
Guest
 
Posts: n/a
Default formatted data

Hi,

Is there a way to output a formatted data based on 3 input clocks?

I'll show you what i mean:

clk1, clk2, clk3 // input clocks
data_i // input data 1-bit
data_o // output data

now,
data_i will be set (0 or 1)
clk1, clk2, clk3 will arrive in different times
data_o will output based on clk1,clk2,clk3

here's an example: RTZ (Return to Zero) type

when clk1 arrives data_o gets the Value of data_i
when clk2 arrives data_o goes HIGH
when clk3 arrives data_o goes back to LOW

another example: SBC (Surrounded by complement) type

when clk1 arrives data_o gets the Value of not(data_i)
when clk2 arrives data_o gets the Value of data_i
when clk3 arrives data_o gets the Value of not(data_i)

---
leaf

Reply With Quote
  #2 (permalink)  
Old 02-06-2006, 09:51 PM
John_H
Guest
 
Posts: n/a
Default Re: formatted data

If you're encoding a data stream, shouldn't there be 1 clock for the data
rate and simple control logic to generate the RZ or SbC data format?
Multiple clocks can make life a sincere mess.

"leaf" <[email protected]> wrote in message
news:[email protected] oups.com...
> Hi,
>
> Is there a way to output a formatted data based on 3 input clocks?
>
> I'll show you what i mean:
>
> clk1, clk2, clk3 // input clocks
> data_i // input data 1-bit
> data_o // output data
>
> now,
> data_i will be set (0 or 1)
> clk1, clk2, clk3 will arrive in different times
> data_o will output based on clk1,clk2,clk3
>
> here's an example: RTZ (Return to Zero) type
>
> when clk1 arrives data_o gets the Value of data_i
> when clk2 arrives data_o goes HIGH
> when clk3 arrives data_o goes back to LOW
>
> another example: SBC (Surrounded by complement) type
>
> when clk1 arrives data_o gets the Value of not(data_i)
> when clk2 arrives data_o gets the Value of data_i
> when clk3 arrives data_o gets the Value of not(data_i)
>
> ---
> leaf



Reply With Quote
  #3 (permalink)  
Old 02-07-2006, 12:21 AM
leaf
Guest
 
Posts: n/a
Default Re: formatted data

you mean i should create a state machine?

but i'm not making a "data stream"
the clocks that arrive are programmed in ns, they can even arrive on
same times if programmed to do so.

--
leaf

Reply With Quote
  #4 (permalink)  
Old 02-07-2006, 01:54 AM
John_H
Guest
 
Posts: n/a
Default Re: formatted data

"leaf" <[email protected]> wrote in message
news:[email protected] oups.com...
> you mean i should create a state machine?
>
> but i'm not making a "data stream"
> the clocks that arrive are programmed in ns, they can even arrive on
> same times if programmed to do so.
>
> --
> leaf


If not a data stream, what are you trying to encode with Return to Zero or
with Surrounded by Complement coding?

And what clocks are you suggesting are "programmed in nanoseconds?" Are
those clocks used to encode the data? Is their source external to your
Verilog design? If internal to your Verilog design, figure out what
generates these "clocks" in the first place and you might see opportunity
for simple control. A 3-bit function seems a little simple to be considered
a state machine (since it's more like a state worm gear rather than a full
machine) but if you want to think of the control mechanism as such, please
do. The task is pretty small so the design of the logic should be straight
forward as long as the control signals are all nicely related to the "one"
clock that you want for your encoded... values.

Bottom line, manipulating registers with multiple clocks isn't pretty. How
do you decide what to do if the clock that says "go hi" comes in at the same
time as the clock that says "go low?" Registers in most hardware are
designed to change states on one clock edge. To get a simulation of more
than one clock, some tricks can be brought to bear to present a
combinatorial output of multiple registers (each clocked by different
source) but these approaches require explicit clock-to-clock timing
relationships (exclusion zones).

So. Just what are you trying to accomplish?


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help with bidirectional data bus code.......... Agreychu Verilog 7 02-22-2005 11:32 PM
Simulation Data extraction vikramts Verilog 8 02-04-2005 04:29 AM
Bit-Stuffing on parallel 8 bit data kumar Verilog 7 02-17-2004 08:54 AM
PLI: manipulating reg data through VPI Girish Venkataramani Verilog 4 11-17-2003 11:09 PM
Data Structure Viewer Jim Wu Verilog 2 08-18-2003 11:51 AM


All times are GMT +1. The time now is 06:40 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved