vhdl code for stuck at faults

Moderator (Company: Titel) #2387032
Rate this post
• ▲ useful
▼ not useful
sreeram sam wrote:
> can anyone please give me a piece of vhdl code for stuck at faults
> stuck-at-0 and stuck-at-1 for any sequential and/or combination
> circuits, just need it to start from the scratch.
So you want to recognize a stucked/failed signal? Then define a 
stuck-at-1: how long must the signal be '1' to be stucked at '1'?

Or do you want to memorize a fault signal (even when the fault 
disapears) to see later, that there was a fault? Then you need a latch.

What do you want to do with the code? Is it "just" for a test bench? Or 
is it for a "real" hardware (FPGA)?
OP #2387159
Rate this post
• ▲ useful
▼ not useful
Lothar Miller wrote:
> sreeram sam wrote:
>> can anyone please give me a piece of vhdl code for stuck at faults
>> stuck-at-0 and stuck-at-1 for any sequential and/or combination
>> circuits, just need it to start from the scratch.
> So you want to recognize a stucked/failed signal? Then define a
> stuck-at-1: how long must the signal be '1' to be stucked at '1'?
>
> Or do you want to memorize a fault signal (even when the fault
> disapears) to see later, that there was a fault? Then you need a latch.
>
> What do you want to do with the code? Is it "just" for a test bench? Or
> is it for a "real" hardware (FPGA)?


yes i need to recognize the fault, the code is for simulation only 
purpose only not for any implementation.
the fault may be a permanent one for a particular circuit. i dont want 
to use a latch and complicate code so much.

thanks Miller
Moderator (Company: Titel) #2387662
Rate this post
• ▲ useful
▼ not useful
Try this as a concurrent statement (without any process):
1
    assert not(now>0 ns and sig='1' and sig'quiet(300 ns)) 
2
        report "sig stuck at '1' for 300ns" severity warning;
3

4
    assert not(now>0 ns and sig='0' and sig'quiet(400 ns))
5
        report "sig stuck at '0' for 400ns" severity warning;
OP #2389127
Rate this post
• ▲ useful
▼ not useful
Lothar Miller wrote:
> Try this as a concurrent statement (without any process):
>
1
>     assert not(now>0 ns and sig='1' and sig'quiet(300 ns))
2
>         report "sig stuck at '1' for 300ns" severity warning;
3
> 
4
>     assert not(now>0 ns and sig='0' and sig'quiet(400 ns))
5
>         report "sig stuck at '0' for 400ns" severity warning;
6
>

kindly give me the declaration parts also.(entity port)

thanks
Moderator (Company: Titel) #2389371
Rate this post
• ▲ useful
▼ not useful
> kindly give me the declaration parts also.(entity port)
Because you want to use this code in a test bench, there is no port in 
the entity.

You can use this code snippet for any signal in any architecture in any 
part of your design. So the only thing missing is:
1
   signal sig : std_logic := '0';

And if your signal is named toggle then the stuck-at-one test will 
read:
1
    assert not(now>0 ns and toggle='1' and toggle'quiet(300 ns)) 
2
        report "toggle stuck at '1' for 300ns" severity warning;
OP #2389684
Rate this post
• ▲ useful
▼ not useful
Lothar Miller wrote:
>> kindly give me the declaration parts also.(entity port)
> Because you want to use this code in a test bench, there is no port in
> the entity.
>
> You can use this code snippet for any signal in any architecture in any
> part of your design. So the only thing missing is:
>
1
>    signal sig : std_logic := '0';
2
>
>
> And if your signal is named toggle then the stuck-at-one test will
> read:
>
1
>     assert not(now>0 ns and toggle='1' and toggle'quiet(300 ns))
2
>         report "toggle stuck at '1' for 300ns" severity warning;
3
>

so can i have this snippet at the end of my work space before i end the 
architecture?
will tat way work?
Guest #6135981
Rate this post
• ▲ useful
▼ not useful
The sender file is an base paper. It is about faults in arithmetic logic 
unit, it is based on hardware partition in time redundancy technique. 
For this we have to write code on faults, that is, we have to check for 
fault occuring in lowerbits of operands. How to check faults in 
lowerbits of operands. This is because our process will be based on the 
condition of narrow width value technique. Please help me how to write 
code for fault occuring in lowerbits of the alu.
Attached files:
Guest #6140671
Rate this post
• ▲ useful
▼ not useful
> B.Haritha wrote:
> Please help me how to write code for fault occuring in lowerbits of the
> alu.
>
> Pls start a new thread for a new question!
>
> And show what you already have and ask for a particular problem. "To
> help someone" doesn't mean "do all the work and present the final
> solution"...

     Please,, kindly visit the above paper.. in that we. Have two 
diagrams which will be known as fault detection and fault diagnosis.. 
based on those two diagrams included algorithm only I have to write an 
verilog code for fault detection.. as well as diagnosis. So, kindly help 
me with this.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.