0
\$\begingroup\$

I've been trying to find a way to set custom timings for signals coming from a digital vector file in a simple test circuit with 4 inputs and 4 outputs as shown.

schematic

simulate this circuit – Schematic created using CircuitLab

I used 4 of these to easily observe input/output behavior.

My digital vector file code is :

radix 1111 
vname v<4> v<3> v<2> v<1>
io iiii
tunit ns
period 10
trise 0.01
tfall 0.01
vih 1
vil 0

0000
0001
0010
0011

as well as some more tabular data that isn't included.

So for example, I want 0000 to occur at 0ns, then 0001 at 15 ns, then 0010 at 16 ns, and 0011 at 20ns. It seems like there is no way to set a custom delay in the .vec file using vector file commands other than inserting a bunch of 0000's so I was wondering if it would be possible to do that through the actual .sp file that uses my digital vector file.

If it helps, this is how I used the vector file in my spice file:

r9 vout<4> 0 1e3
r8 v<4> vout<4> 1e3
r7 vout<3> 0 1e3
r6 v<3> vout<3> 1e3
r5 vout<2> 0 1e3
r4 v<2> vout<2> 1e3
r1 vout<1> 0 1e3
r0 v<1> vout<1> 1e3

.vec 'tabvec.vec'

.print v(*)
.probe v(*)
.options post

.tran 1n 200n
\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

So for example, I want 0000 to occur at 0ns, then 0001 at 15 ns, then 0010 at 16 ns, and 0011 at 20ns. ...

In this PDF file:

https://www.bioee.ee.columbia.edu/courses/cad/html/vector_file.pdf

on page 39 it says the following about tabular data:

enter image description here

So I'd try not using the period directive and adding timestamps to your tabular data. That page of the PDF also contains this example:

; format: time vector
0 000101010
10 011010101
20 000101010
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.