Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PISO Shift Register (Verilog-A)

Status
Not open for further replies.

yahzee

Newbie level 1
Newbie level 1
Joined
May 28, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,298
Hey guys, I'm very new to Verilog-A, and there doesn't seem to be a lot of information about Verilog-A online besides the LRM. There's lots of info about Verilog, Verilog-AMS, VHDL and other related languages but nothing that really pertains to Verilog-A. I am trying to code a 10 bit parallel in, serial out shift register and I'm running into trouble of exactly how to output serially. I believe that I have the parallel inputs correctly but I could be wrong, so any help is really appreciated. One of my thought processes is that I could have another clock that was multiplied by 10, in order to shift out each bit at the correct time. Basically I do not know how to move forward from the code here:




Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module test
   (vin_d0,vin_d1,vin_d2,vin_d3,vin_d4,vin_d5,vin_d6,vin_d7,vin_d8,vin_d9
   ,vout_d,vclk);
input vin_d0, vin_d1,vin_d2,vin_d3,vin_d4,vin_d5,vin_d6,vin_d7,vin_d8,vin_d9;   
electrical vin_d0,vin_d1,vin_d2,vin_d3,vin_d4,vin_d5,vin_d6,vin_d7,vin_d8,vin_d9;
output vout_d;
electrical vout_d;
electrical vclk;
 
 
   parameter real vlogic_high = 5;
   parameter real vlogic_low = 0;
   parameter real vtrans = 2.5;
   parameter real tdel = 3u from [0:inf);
   parameter real trise = 1u from (0:inf);
   parameter real tfall = 1u from (0:inf);
   
   integer i;
   integer d[0:9];
 
   analog begin
      @ ( cross ( V(vclk) - vtrans, +1, 1.0, vclk.potential.abstol)) begin
         d[0] = V(vin_d0) > vtrans;
         d[1] = V(vin_d1) > vtrans;
         d[2] = V(vin_d2) > vtrans;
         d[3] = V(vin_d3) > vtrans;
         d[4] = V(vin_d4) > vtrans;
         d[5] = V(vin_d5) > vtrans;
         d[6] = V(vin_d6) > vtrans;
         d[7] = V(vin_d7) > vtrans;
     d[8] = V(vin_d8) > vtrans;
     d[9] = V(vin_d9) > vtrans;
         
        @ ( cross ( V(vclk*10) - vtrans, +1, 1.0, vclk.potential.abstol)) begin // (shifting and output should be here - i think)
       end
      
 
end                            
 
endmodule

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top