#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "constype.h"
Go to the source code of this file.
|
static void | print_condition (FILE *fp, char *name, TIME chtime, int index, int lvalue, int printstep, int stepnr) |
|
static int | latch_signal_value (TIME check_time, EDGE **prev_edge, int init_value) |
|
static int | generate_sync_latch_passfail (FILE *fp, SIGNALS *sp, int runall) |
|
static int | collect_passfail_condition (PF_CONDITION **bpf, int sig_num, TIME check_time, int curr_index, int curr_value) |
|
static void | print_passfail_conditions (FILE *fp, SIGNALS *sp, PF_CONDITION *bpf, int runall) |
|
static int | generate_async_latch_passfail (FILE *fp, SIGNALS *sp, int runall) |
|
int | generate_latch_passfail_file (SIGNALS *sp, char *filename, int runall) |
|
static int collect_passfail_condition |
( |
PF_CONDITION ** |
bpf, |
|
|
int |
sig_num, |
|
|
TIME |
check_time, |
|
|
int |
curr_index, |
|
|
int |
curr_value |
|
) |
| |
|
static |
Definition at line 129 of file vpassfail.c.
138 npf->
index = curr_index;
139 npf->
time = check_time;
140 npf->
value = curr_value;
152 if(curr_index < cpf->
index) {
160 if(curr_index < cpf->index)
struct passfail_condition * next
static int generate_async_latch_passfail |
( |
FILE * |
fp, |
|
|
SIGNALS * |
sp, |
|
|
int |
runall |
|
) |
| |
|
static |
Definition at line 208 of file vpassfail.c.
210 TIME total_time, last_edge, next_edge, curr_time, check_time;
217 TIME min_interval_to_edge;
238 last_edge_dir = 1 - last_edge_dir;
239 next_edge = total_time;
250 curr_time = (next_edge + last_edge)/2;
258 while(curr_time < next_edge - min_interval_to_edge) {
266 curr_value = 1 - curr_value;
267 last_edge = next_edge;
static int collect_passfail_condition(PF_CONDITION **bpf, int sig_num, TIME check_time, int curr_index, int curr_value)
TIME min_interval_to_falledge
TIME min_interval_to_riseedge
static void print_passfail_conditions(FILE *fp, SIGNALS *sp, PF_CONDITION *bpf, int runall)
int generate_latch_passfail_file |
( |
SIGNALS * |
sp, |
|
|
char * |
filename, |
|
|
int |
runall |
|
) |
| |
Definition at line 279 of file vpassfail.c.
293 fprintf(fp,
".control\n\n");
299 fprintf(fp,
"run\n\n");
306 fprintf(fp,
"if chFAIL = 1\n");
307 fprintf(fp,
"\tfree all yes\n");
308 fprintf(fp,
"\tchFAIL = 1\n");
309 fprintf(fp,
"end\n\n");
311 fprintf(fp,
"if chFAIL = 0\n");
312 fprintf(fp,
"\tfree all yes\n");
313 fprintf(fp,
"\tchFAIL = 0\n");
314 fprintf(fp,
"end\n\n");
static int generate_async_latch_passfail(FILE *fp, SIGNALS *sp, int runall)
static int generate_sync_latch_passfail(FILE *fp, SIGNALS *sp, int runall)
static char filename[LINE_LENGTH]
static int generate_sync_latch_passfail |
( |
FILE * |
fp, |
|
|
SIGNALS * |
sp, |
|
|
int |
runall |
|
) |
| |
|
static |
Definition at line 48 of file vpassfail.c.
50 EDGE **prev_edge, *clk_edge;
51 TIME check_time, check_norm_time, clk_pulse_bgn, clk_pulse_end, total_time;
63 if(prev_edge == NULL) {
66 for(sig_num=0; sig_num<sp->
outs_num; sig_num++) {
79 clk_edge=clk_edge->
next;
83 clk_pulse_end = total_time;
93 check_time = clk_pulse_bgn +
109 last_index = check_index;
112 clk_edge=clk_edge->
next;
static void print_condition(FILE *fp, char *name, TIME chtime, int index, int lvalue, int printstep, int stepnr)
static int latch_signal_value(TIME check_time, EDGE **prev_edge, int init_value)
char(* jspice_voltage_names)[NAME_LENGTH]
static int latch_signal_value |
( |
TIME |
check_time, |
|
|
EDGE ** |
prev_edge, |
|
|
int |
init_value |
|
) |
| |
|
static |
Definition at line 22 of file vpassfail.c.
35 if(check_time < ne->exact_time)
static void print_condition |
( |
FILE * |
fp, |
|
|
char * |
name, |
|
|
TIME |
chtime, |
|
|
int |
index, |
|
|
int |
lvalue, |
|
|
int |
printstep, |
|
|
int |
stepnr |
|
) |
| |
|
static |
Definition at line 7 of file vpassfail.c.
9 char sign = lvalue?
'<':
'>';
11 fprintf(fp,
"if chFAIL = 0\n");
13 fprintf(fp,
"\tstep %d\n", stepnr);
14 fprintf(fp,
"\tif (%s[%d]) %c vthreshold%d\n", name,
index, sign, lvalue);
15 fprintf(fp,
"\t\tchFAIL = 1\n");
16 fprintf(fp,
"\t\techo FAILED FOR TIME = %.1f ps\n", chtime*1.0e12);
17 fprintf(fp,
"\tend\n");
18 fprintf(fp,
"end\n\n");
static void print_passfail_conditions |
( |
FILE * |
fp, |
|
|
SIGNALS * |
sp, |
|
|
PF_CONDITION * |
bpf, |
|
|
int |
runall |
|
) |
| |
|
static |
Definition at line 171 of file vpassfail.c.
176 int stepnum, indexlimit, edgenum;
189 while(cpf->
index < indexlimit) {
static void print_condition(FILE *fp, char *name, TIME chtime, int index, int lvalue, int printstep, int stepnr)
struct passfail_condition * next
char(* jspice_voltage_names)[NAME_LENGTH]