Add support to select min/typ/max delays from the SDF file.
This patch adds support to select either the min, typ or max delay depending on what was used by the compiler.
This commit is contained in:
parent
1a915005c4
commit
47f1286819
|
|
@ -391,7 +391,18 @@ hierarchical_identifier
|
|||
|
||||
rtriple
|
||||
: signed_real_number ':' signed_real_number ':' signed_real_number
|
||||
{ $$ = $3; /* XXXX Assume typical value. */ }
|
||||
{ switch(sdf_min_typ_max) {
|
||||
case _vpiDelaySelMinimum:
|
||||
$$ = $1;
|
||||
break;
|
||||
case _vpiDelaySelTypical:
|
||||
$$ = $3;
|
||||
break;
|
||||
case _vpiDelaySelMaximum:
|
||||
$$ = $5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
signed_real_number
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _sdf_priv_h
|
||||
#define _sdf_priv_h
|
||||
/*
|
||||
* Copyright (c) 2007-2009 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2007-2010 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -31,6 +31,8 @@ extern void sdf_process_file(FILE*fd, const char*path);
|
|||
extern int sdf_flag_warning;
|
||||
extern int sdf_flag_inform;
|
||||
|
||||
extern int sdf_min_typ_max;
|
||||
|
||||
/* ****
|
||||
* These functions are called by the parser to process the SDF file as
|
||||
* it is parsed.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007-2009 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2007-2010 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
int sdf_flag_warning = 0;
|
||||
int sdf_flag_inform = 0;
|
||||
int sdf_min_typ_max;
|
||||
|
||||
/* Scope of the $sdf_annotate call. Annotation starts here. */
|
||||
static vpiHandle sdf_scope;
|
||||
|
|
@ -286,7 +287,7 @@ static PLI_INT32 sys_sdf_annotate_compiletf(PLI_BYTE8*name)
|
|||
|
||||
static PLI_INT32 sys_sdf_annotate_calltf(PLI_BYTE8*name)
|
||||
{
|
||||
vpiHandle callh = vpi_handle(vpiSysTfCall,0);
|
||||
vpiHandle callh = vpi_handle(vpiSysTfCall, 0);
|
||||
vpiHandle argv = vpi_iterate(vpiArgument, callh);
|
||||
FILE *sdf_fd;
|
||||
char *fname = get_filename(callh, name, vpi_scan(argv));
|
||||
|
|
@ -307,6 +308,9 @@ static PLI_INT32 sys_sdf_annotate_calltf(PLI_BYTE8*name)
|
|||
if (sdf_scope) vpi_free_object(argv);
|
||||
else sdf_scope = vpi_handle(vpiScope, callh);
|
||||
|
||||
/* Select which delay to use. */
|
||||
sdf_min_typ_max = vpi_get(_vpiDelaySelection, 0);
|
||||
|
||||
sdf_cur_cell = 0;
|
||||
sdf_callh = callh;
|
||||
sdf_process_file(sdf_fd, fname);
|
||||
|
|
|
|||
Loading…
Reference in New Issue