1

I am trying to run this Hspice code in Spectre.

enter image description here

I am getting this error

enter image description here

Can anyone help me what is the mistake?

Rohit
  • 488
  • 6
  • 21
  • Are you sure HSPICE supports doing a `.DC` command on a resistor? Typically in SPICE, you can only do that to independent voltage and/or current sources. i.e. only things that start with `V` or `I`, not `R`. – Ste Kulov Jan 19 '21 at 22:02
  • @SteKulov Yes, In the manual, it was written for a resistor like that so I used it. – Rohit Jan 20 '21 at 10:38
  • @Rohit Then my answer doesn't apply to your case, I deleted it. I can't help you since I don't know HSPICE and, AFAIK, it's known to handle SPICE-related things quite unusually. Best ask in their forums. – a concerned citizen Jan 20 '21 at 12:39
  • @aconcernedcitizen I wouldn't have gone that far. It's not clear in the original post, but he's using Spectre and not HSPICE. Spectre's SPICE parser doesn't look like it supports HSPICE's extended `.DC` command. That's likely where the issue is. – Ste Kulov Jan 20 '21 at 18:09
  • 1
    @Rohit Try changing `R2` to `V1` and see if it works. If it does, then it obeys the usual SPICE rules, which means you can only use voltage or current sources for `.DC`. – a concerned citizen Jan 20 '21 at 21:10
  • @SteKulov Well, whatever the case, my answer didn't solve OP's problems, since in the comments OP wrote something about an `unknown parameter [x]`. So it's another quirk in interpretation of commands, or maybe only the curly braces, who knows? I don't, so I make room for someone else who does. – a concerned citizen Jan 20 '21 at 21:12

1 Answers1

0

Change print V(2) to print or plot V(2,0). Voltage differential between 2 and 0.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182