Adjust unusual spacing
minimal changes, nearly eliminates oddball/inconsistent source code use of whitespace
This commit is contained in:
parent
ceef77e15f
commit
39dd22ace4
|
|
@ -202,7 +202,7 @@ static FILE*fopen_safe(const char*path)
|
|||
if (fd != -1)
|
||||
file = _fdopen(fd, "w");
|
||||
|
||||
return file;
|
||||
return file;
|
||||
}
|
||||
#else
|
||||
# include <fcntl.h>
|
||||
|
|
@ -215,7 +215,7 @@ static FILE*fopen_safe(const char*path)
|
|||
if (fd != -1)
|
||||
file = fdopen(fd, "w");
|
||||
|
||||
return file;
|
||||
return file;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -436,25 +436,25 @@ int process_generation(const char*name)
|
|||
else if (strcmp(name,"xtypes") == 0)
|
||||
gen_xtypes = "xtypes";
|
||||
|
||||
else if (strcmp(name,"no-xtypes") == 0)
|
||||
else if (strcmp(name,"no-xtypes") == 0)
|
||||
gen_xtypes = "no-xtypes";
|
||||
|
||||
else if (strcmp(name,"specify") == 0)
|
||||
else if (strcmp(name,"specify") == 0)
|
||||
gen_specify = "specify";
|
||||
|
||||
else if (strcmp(name,"no-specify") == 0)
|
||||
else if (strcmp(name,"no-specify") == 0)
|
||||
gen_specify = "no-specify";
|
||||
|
||||
else if (strcmp(name,"std-include") == 0)
|
||||
else if (strcmp(name,"std-include") == 0)
|
||||
gen_std_include = 1;
|
||||
|
||||
else if (strcmp(name,"no-std-include") == 0)
|
||||
else if (strcmp(name,"no-std-include") == 0)
|
||||
gen_std_include = 0;
|
||||
|
||||
else if (strcmp(name,"io-range-error") == 0)
|
||||
else if (strcmp(name,"io-range-error") == 0)
|
||||
gen_io_range_error = "io-range-error";
|
||||
|
||||
else if (strcmp(name,"no-io-range-error") == 0)
|
||||
else if (strcmp(name,"no-io-range-error") == 0)
|
||||
gen_io_range_error = "no-io-range-error";
|
||||
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -3506,7 +3506,7 @@ NetNet* PEUnary::elab_net_unary_real_(Design*des, NetScope*scope,
|
|||
connect(tmp_sig->pin(0), sub->pin_DataA());
|
||||
connect(tmp_sig->pin(0), tmp_con->pin(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return sig;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ W [ \t\b\f\r]+
|
|||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
\\[^ \t\b\f\r\n]+ {
|
||||
|
|
@ -337,7 +337,7 @@ W [ \t\b\f\r]+
|
|||
error_count += 1;
|
||||
}
|
||||
pform_set_default_nettype(net_type, yylloc.text, yylloc.first_line);
|
||||
}
|
||||
}
|
||||
<PPDEFAULT_NETTYPE>\n {
|
||||
yylloc.first_line += 1;
|
||||
BEGIN(0); }
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ ostream& operator<< (ostream&out, const index_component_t&that)
|
|||
}
|
||||
out << "]";
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
ostream& operator<< (ostream&out, const name_component_t&that)
|
||||
{
|
||||
|
|
|
|||
6
t-dll.cc
6
t-dll.cc
|
|
@ -1973,13 +1973,13 @@ bool dll_target::part_select(const NetPartSelect*net)
|
|||
strength aware output, so attach it to the nexus with
|
||||
strong driver. */
|
||||
if (obj->type == IVL_LPM_PART_BI)
|
||||
nexus_lpm_add(obj->u_.part.a, obj, 0, IVL_DR_STRONG, IVL_DR_STRONG);
|
||||
nexus_lpm_add(obj->u_.part.a, obj, 0, IVL_DR_STRONG, IVL_DR_STRONG);
|
||||
else
|
||||
nexus_lpm_add(obj->u_.part.a, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||
nexus_lpm_add(obj->u_.part.a, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||
|
||||
/* The select input is optional. */
|
||||
if (obj->u_.part.s)
|
||||
nexus_lpm_add(obj->u_.part.s, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||
nexus_lpm_add(obj->u_.part.s, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||
|
||||
make_lpm_delays_(obj, net);
|
||||
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ static int show_stmt_assign_nb_real(ivl_statement_t net)
|
|||
/* Evaluate the r-value */
|
||||
word = draw_eval_real(rval);
|
||||
|
||||
fprintf(vvp_out, " %%assign/wr v%p_%lu, %lu, %u;\n",
|
||||
fprintf(vvp_out, " %%assign/wr v%p_%lu, %lu, %u;\n",
|
||||
sig, use_word, delay, word);
|
||||
|
||||
clr_word(word);
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ static PLI_INT32 sys_fscanf_calltf(PLI_BYTE8*name)
|
|||
src.fd = fd;
|
||||
scan_format(sys, &src, argv);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PLI_INT32 sys_sscanf_compiletf(PLI_BYTE8*name)
|
||||
|
|
|
|||
12
vpi_user.h
12
vpi_user.h
|
|
@ -218,12 +218,12 @@ typedef struct t_vpi_value {
|
|||
|
||||
|
||||
typedef struct t_vpi_delay {
|
||||
struct t_vpi_time *da; /* Array of delay data */
|
||||
PLI_INT32 no_of_delays ;
|
||||
PLI_INT32 time_type; /* vpiScaledRealTime, vpiSimTime */
|
||||
PLI_INT32 mtm_flag;
|
||||
PLI_INT32 append_flag;
|
||||
PLI_INT32 plusere_flag;
|
||||
struct t_vpi_time *da; /* Array of delay data */
|
||||
PLI_INT32 no_of_delays ;
|
||||
PLI_INT32 time_type; /* vpiScaledRealTime, vpiSimTime */
|
||||
PLI_INT32 mtm_flag;
|
||||
PLI_INT32 append_flag;
|
||||
PLI_INT32 plusere_flag;
|
||||
} s_vpi_delay, *p_vpi_delay;
|
||||
|
||||
|
||||
|
|
|
|||
28
vvp/delay.cc
28
vvp/delay.cc
|
|
@ -575,7 +575,7 @@ static vpiHandle modpath_src_get_handle(int code, vpiHandle ref)
|
|||
|
||||
case vpiModPathOut:
|
||||
return vpi_handle(&rfp->dest->path_term_out);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -730,17 +730,17 @@ static vpiHandle pathterm_get_handle(int code, vpiHandle ref)
|
|||
* are common to a bunch of modpaths, including the destination term.
|
||||
*/
|
||||
static const struct __vpirt vpip_modpath_src_rt = {
|
||||
vpiModPath,
|
||||
modpath_src_get,
|
||||
0, /* vpi_get_str */
|
||||
modpath_src_get_value,
|
||||
modpath_src_put_value,
|
||||
modpath_src_get_handle,
|
||||
0, /* modpath_src_iterate,*/
|
||||
modpath_src_index,
|
||||
modpath_src_free_object,
|
||||
modpath_src_get_delays,
|
||||
modpath_src_put_delays
|
||||
vpiModPath,
|
||||
modpath_src_get,
|
||||
0, /* vpi_get_str */
|
||||
modpath_src_get_value,
|
||||
modpath_src_put_value,
|
||||
modpath_src_get_handle,
|
||||
0, /* modpath_src_iterate,*/
|
||||
modpath_src_index,
|
||||
modpath_src_free_object,
|
||||
modpath_src_get_delays,
|
||||
modpath_src_put_delays
|
||||
};
|
||||
|
||||
static const struct __vpirt vpip_modpath_term_rt = {
|
||||
|
|
@ -810,7 +810,7 @@ struct __vpiModPathSrc* vpip_make_modpath_src (struct __vpiModPath*path, vvp_tim
|
|||
struct __vpiModPathTerm* vpip_modpath_term_from_handle(vpiHandle ref)
|
||||
{
|
||||
if (ref->vpi_type->type_code != vpiPathTerm)
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
return (struct __vpiModPathTerm*) ref;
|
||||
}
|
||||
|
|
@ -824,7 +824,7 @@ struct __vpiModPathTerm* vpip_modpath_term_from_handle(vpiHandle ref)
|
|||
struct __vpiModPathSrc* vpip_modpath_src_from_handle(vpiHandle ref)
|
||||
{
|
||||
if (ref->vpi_type->type_code != vpiModPath)
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
return (struct __vpiModPathSrc *) ref;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ struct sync_cb : public vvp_gen_event_s {
|
|||
struct __vpiCallback*handle;
|
||||
bool sync_flag;
|
||||
|
||||
~sync_cb () { }
|
||||
~sync_cb () { }
|
||||
|
||||
virtual void run_run();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ struct vpip_put_value_event : vvp_gen_event_s {
|
|||
vpiHandle handle;
|
||||
s_vpi_value value;
|
||||
virtual void run_run();
|
||||
~vpip_put_value_event() { }
|
||||
~vpip_put_value_event() { }
|
||||
};
|
||||
|
||||
void vpip_put_value_event::run_run()
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ struct __vpirt {
|
|||
These two methods are used to read/write delay
|
||||
values from/into modpath records
|
||||
*/
|
||||
void (*vpi_get_delays_)(vpiHandle, p_vpi_delay);
|
||||
void (*vpi_put_delays_)(vpiHandle, p_vpi_delay);
|
||||
void (*vpi_get_delays_)(vpiHandle, p_vpi_delay);
|
||||
void (*vpi_put_delays_)(vpiHandle, p_vpi_delay);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ static void signal_get_IntVal(struct __vpiSignal*rfp, s_vpi_value*vp)
|
|||
|
||||
static void signal_get_ScalarVal(struct __vpiSignal*rfp, s_vpi_value*vp)
|
||||
{
|
||||
vvp_fun_signal*vsig = dynamic_cast<vvp_fun_signal*>(rfp->node->fun);
|
||||
vvp_fun_signal*vsig = dynamic_cast<vvp_fun_signal*>(rfp->node->fun);
|
||||
|
||||
switch (vsig->value(0)) {
|
||||
case BIT4_0:
|
||||
|
|
@ -365,47 +365,47 @@ static void signal_get_ScalarVal(struct __vpiSignal*rfp, s_vpi_value*vp)
|
|||
|
||||
static void signal_get_StrengthVal(struct __vpiSignal*rfp, s_vpi_value*vp)
|
||||
{
|
||||
vvp_fun_signal_vec*vsig = dynamic_cast<vvp_fun_signal_vec*>(rfp->node->fun);
|
||||
unsigned wid = signal_width(rfp);
|
||||
s_vpi_strengthval*op;
|
||||
vvp_fun_signal_vec*vsig = dynamic_cast<vvp_fun_signal_vec*>(rfp->node->fun);
|
||||
unsigned wid = signal_width(rfp);
|
||||
s_vpi_strengthval*op;
|
||||
|
||||
op = (s_vpi_strengthval*)
|
||||
need_result_buf(wid * sizeof(s_vpi_strengthval), RBUF_VAL);
|
||||
op = (s_vpi_strengthval*)
|
||||
need_result_buf(wid * sizeof(s_vpi_strengthval), RBUF_VAL);
|
||||
|
||||
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
|
||||
vvp_scalar_t val = vsig->scalar_value(idx);
|
||||
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
|
||||
vvp_scalar_t val = vsig->scalar_value(idx);
|
||||
|
||||
/* vvp_scalar_t strengths are 0-7, but the vpi strength
|
||||
is bit0-bit7. This gets the vpi form of the strengths
|
||||
from the vvp_scalar_t strengths. */
|
||||
unsigned s0 = 1 << val.strength0();
|
||||
unsigned s1 = 1 << val.strength1();
|
||||
unsigned s0 = 1 << val.strength0();
|
||||
unsigned s1 = 1 << val.strength1();
|
||||
|
||||
switch (val.value()) {
|
||||
case BIT4_0:
|
||||
op[idx].logic = vpi0;
|
||||
op[idx].s0 = s0|s1;
|
||||
op[idx].s1 = 0;
|
||||
break;
|
||||
case BIT4_1:
|
||||
op[idx].logic = vpi1;
|
||||
op[idx].s0 = 0;
|
||||
op[idx].s1 = s0|s1;
|
||||
break;
|
||||
case BIT4_X:
|
||||
op[idx].logic = vpiX;
|
||||
op[idx].s0 = s0;
|
||||
op[idx].s1 = s1;
|
||||
break;
|
||||
case BIT4_Z:
|
||||
op[idx].logic = vpiZ;
|
||||
op[idx].s0 = vpiHiZ;
|
||||
op[idx].s1 = vpiHiZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (val.value()) {
|
||||
case BIT4_0:
|
||||
op[idx].logic = vpi0;
|
||||
op[idx].s0 = s0|s1;
|
||||
op[idx].s1 = 0;
|
||||
break;
|
||||
case BIT4_1:
|
||||
op[idx].logic = vpi1;
|
||||
op[idx].s0 = 0;
|
||||
op[idx].s1 = s0|s1;
|
||||
break;
|
||||
case BIT4_X:
|
||||
op[idx].logic = vpiX;
|
||||
op[idx].s0 = s0;
|
||||
op[idx].s1 = s1;
|
||||
break;
|
||||
case BIT4_Z:
|
||||
op[idx].logic = vpiZ;
|
||||
op[idx].s0 = vpiHiZ;
|
||||
op[idx].s1 = vpiHiZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vp->value.strength = op;
|
||||
vp->value.strength = op;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3258,7 +3258,7 @@ bool of_RELEASE_REG(vthread_t thr, vvp_code_t cp)
|
|||
// And this is the pointer to be removed.
|
||||
vvp_net_ptr_t dst_ptr (net, 2);
|
||||
unlink_from_driver(src, dst_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
// Send a command to this signal to unforce itself.
|
||||
vvp_net_ptr_t ptr (net, 3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue