Adjust unusual spacing

minimal changes, nearly eliminates oddball/inconsistent
source code use of whitespace
This commit is contained in:
Larry Doolittle 2008-02-15 15:05:39 -08:00 committed by Stephen Williams
parent ceef77e15f
commit 39dd22ace4
14 changed files with 77 additions and 77 deletions

View File

@ -202,7 +202,7 @@ static FILE*fopen_safe(const char*path)
if (fd != -1) if (fd != -1)
file = _fdopen(fd, "w"); file = _fdopen(fd, "w");
return file; return file;
} }
#else #else
# include <fcntl.h> # include <fcntl.h>
@ -215,7 +215,7 @@ static FILE*fopen_safe(const char*path)
if (fd != -1) if (fd != -1)
file = fdopen(fd, "w"); file = fdopen(fd, "w");
return file; return file;
} }
#endif #endif
@ -436,25 +436,25 @@ int process_generation(const char*name)
else if (strcmp(name,"xtypes") == 0) else if (strcmp(name,"xtypes") == 0)
gen_xtypes = "xtypes"; gen_xtypes = "xtypes";
else if (strcmp(name,"no-xtypes") == 0) else if (strcmp(name,"no-xtypes") == 0)
gen_xtypes = "no-xtypes"; gen_xtypes = "no-xtypes";
else if (strcmp(name,"specify") == 0) else if (strcmp(name,"specify") == 0)
gen_specify = "specify"; gen_specify = "specify";
else if (strcmp(name,"no-specify") == 0) else if (strcmp(name,"no-specify") == 0)
gen_specify = "no-specify"; gen_specify = "no-specify";
else if (strcmp(name,"std-include") == 0) else if (strcmp(name,"std-include") == 0)
gen_std_include = 1; gen_std_include = 1;
else if (strcmp(name,"no-std-include") == 0) else if (strcmp(name,"no-std-include") == 0)
gen_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"; 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"; gen_io_range_error = "no-io-range-error";
else { else {

View File

@ -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), sub->pin_DataA());
connect(tmp_sig->pin(0), tmp_con->pin(0)); connect(tmp_sig->pin(0), tmp_con->pin(0));
break; break;
} }
return sig; return sig;
} }

View File

@ -231,7 +231,7 @@ W [ \t\b\f\r]+
} }
return rc; return rc;
} }
\\[^ \t\b\f\r\n]+ { \\[^ \t\b\f\r\n]+ {
@ -337,7 +337,7 @@ W [ \t\b\f\r]+
error_count += 1; error_count += 1;
} }
pform_set_default_nettype(net_type, yylloc.text, yylloc.first_line); pform_set_default_nettype(net_type, yylloc.text, yylloc.first_line);
} }
<PPDEFAULT_NETTYPE>\n { <PPDEFAULT_NETTYPE>\n {
yylloc.first_line += 1; yylloc.first_line += 1;
BEGIN(0); } BEGIN(0); }

View File

@ -97,7 +97,7 @@ ostream& operator<< (ostream&out, const index_component_t&that)
} }
out << "]"; out << "]";
return out; return out;
} }
ostream& operator<< (ostream&out, const name_component_t&that) ostream& operator<< (ostream&out, const name_component_t&that)
{ {

View File

@ -1973,13 +1973,13 @@ bool dll_target::part_select(const NetPartSelect*net)
strength aware output, so attach it to the nexus with strength aware output, so attach it to the nexus with
strong driver. */ strong driver. */
if (obj->type == IVL_LPM_PART_BI) 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 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. */ /* The select input is optional. */
if (obj->u_.part.s) 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); make_lpm_delays_(obj, net);

View File

@ -471,7 +471,7 @@ static int show_stmt_assign_nb_real(ivl_statement_t net)
/* Evaluate the r-value */ /* Evaluate the r-value */
word = draw_eval_real(rval); 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); sig, use_word, delay, word);
clr_word(word); clr_word(word);

View File

@ -539,7 +539,7 @@ static PLI_INT32 sys_fscanf_calltf(PLI_BYTE8*name)
src.fd = fd; src.fd = fd;
scan_format(sys, &src, argv); scan_format(sys, &src, argv);
return 0; return 0;
} }
static PLI_INT32 sys_sscanf_compiletf(PLI_BYTE8*name) static PLI_INT32 sys_sscanf_compiletf(PLI_BYTE8*name)

View File

@ -218,12 +218,12 @@ typedef struct t_vpi_value {
typedef struct t_vpi_delay { typedef struct t_vpi_delay {
struct t_vpi_time *da; /* Array of delay data */ struct t_vpi_time *da; /* Array of delay data */
PLI_INT32 no_of_delays ; PLI_INT32 no_of_delays ;
PLI_INT32 time_type; /* vpiScaledRealTime, vpiSimTime */ PLI_INT32 time_type; /* vpiScaledRealTime, vpiSimTime */
PLI_INT32 mtm_flag; PLI_INT32 mtm_flag;
PLI_INT32 append_flag; PLI_INT32 append_flag;
PLI_INT32 plusere_flag; PLI_INT32 plusere_flag;
} s_vpi_delay, *p_vpi_delay; } s_vpi_delay, *p_vpi_delay;

View File

@ -575,7 +575,7 @@ static vpiHandle modpath_src_get_handle(int code, vpiHandle ref)
case vpiModPathOut: case vpiModPathOut:
return vpi_handle(&rfp->dest->path_term_out); return vpi_handle(&rfp->dest->path_term_out);
} }
return 0; 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. * are common to a bunch of modpaths, including the destination term.
*/ */
static const struct __vpirt vpip_modpath_src_rt = { static const struct __vpirt vpip_modpath_src_rt = {
vpiModPath, vpiModPath,
modpath_src_get, modpath_src_get,
0, /* vpi_get_str */ 0, /* vpi_get_str */
modpath_src_get_value, modpath_src_get_value,
modpath_src_put_value, modpath_src_put_value,
modpath_src_get_handle, modpath_src_get_handle,
0, /* modpath_src_iterate,*/ 0, /* modpath_src_iterate,*/
modpath_src_index, modpath_src_index,
modpath_src_free_object, modpath_src_free_object,
modpath_src_get_delays, modpath_src_get_delays,
modpath_src_put_delays modpath_src_put_delays
}; };
static const struct __vpirt vpip_modpath_term_rt = { 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) struct __vpiModPathTerm* vpip_modpath_term_from_handle(vpiHandle ref)
{ {
if (ref->vpi_type->type_code != vpiPathTerm) if (ref->vpi_type->type_code != vpiPathTerm)
return 0; return 0;
return (struct __vpiModPathTerm*) ref; 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) struct __vpiModPathSrc* vpip_modpath_src_from_handle(vpiHandle ref)
{ {
if (ref->vpi_type->type_code != vpiModPath) if (ref->vpi_type->type_code != vpiModPath)
return 0; return 0;
return (struct __vpiModPathSrc *) ref; return (struct __vpiModPathSrc *) ref;
} }

View File

@ -85,7 +85,7 @@ struct sync_cb : public vvp_gen_event_s {
struct __vpiCallback*handle; struct __vpiCallback*handle;
bool sync_flag; bool sync_flag;
~sync_cb () { } ~sync_cb () { }
virtual void run_run(); virtual void run_run();
}; };

View File

@ -641,7 +641,7 @@ struct vpip_put_value_event : vvp_gen_event_s {
vpiHandle handle; vpiHandle handle;
s_vpi_value value; s_vpi_value value;
virtual void run_run(); virtual void run_run();
~vpip_put_value_event() { } ~vpip_put_value_event() { }
}; };
void vpip_put_value_event::run_run() void vpip_put_value_event::run_run()

View File

@ -94,8 +94,8 @@ struct __vpirt {
These two methods are used to read/write delay These two methods are used to read/write delay
values from/into modpath records values from/into modpath records
*/ */
void (*vpi_get_delays_)(vpiHandle, p_vpi_delay); void (*vpi_get_delays_)(vpiHandle, p_vpi_delay);
void (*vpi_put_delays_)(vpiHandle, p_vpi_delay); void (*vpi_put_delays_)(vpiHandle, p_vpi_delay);
}; };
/* /*

View File

@ -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) 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)) { switch (vsig->value(0)) {
case BIT4_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) 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); vvp_fun_signal_vec*vsig = dynamic_cast<vvp_fun_signal_vec*>(rfp->node->fun);
unsigned wid = signal_width(rfp); unsigned wid = signal_width(rfp);
s_vpi_strengthval*op; s_vpi_strengthval*op;
op = (s_vpi_strengthval*) op = (s_vpi_strengthval*)
need_result_buf(wid * sizeof(s_vpi_strengthval), RBUF_VAL); need_result_buf(wid * sizeof(s_vpi_strengthval), RBUF_VAL);
for (unsigned idx = 0 ; idx < wid ; idx += 1) { for (unsigned idx = 0 ; idx < wid ; idx += 1) {
vvp_scalar_t val = vsig->scalar_value(idx); vvp_scalar_t val = vsig->scalar_value(idx);
/* vvp_scalar_t strengths are 0-7, but the vpi strength /* vvp_scalar_t strengths are 0-7, but the vpi strength
is bit0-bit7. This gets the vpi form of the strengths is bit0-bit7. This gets the vpi form of the strengths
from the vvp_scalar_t strengths. */ from the vvp_scalar_t strengths. */
unsigned s0 = 1 << val.strength0(); unsigned s0 = 1 << val.strength0();
unsigned s1 = 1 << val.strength1(); unsigned s1 = 1 << val.strength1();
switch (val.value()) { switch (val.value()) {
case BIT4_0: case BIT4_0:
op[idx].logic = vpi0; op[idx].logic = vpi0;
op[idx].s0 = s0|s1; op[idx].s0 = s0|s1;
op[idx].s1 = 0; op[idx].s1 = 0;
break; break;
case BIT4_1: case BIT4_1:
op[idx].logic = vpi1; op[idx].logic = vpi1;
op[idx].s0 = 0; op[idx].s0 = 0;
op[idx].s1 = s0|s1; op[idx].s1 = s0|s1;
break; break;
case BIT4_X: case BIT4_X:
op[idx].logic = vpiX; op[idx].logic = vpiX;
op[idx].s0 = s0; op[idx].s0 = s0;
op[idx].s1 = s1; op[idx].s1 = s1;
break; break;
case BIT4_Z: case BIT4_Z:
op[idx].logic = vpiZ; op[idx].logic = vpiZ;
op[idx].s0 = vpiHiZ; op[idx].s0 = vpiHiZ;
op[idx].s1 = vpiHiZ; op[idx].s1 = vpiHiZ;
break; break;
} }
} }
vp->value.strength = op; vp->value.strength = op;
} }
/* /*

View File

@ -3258,7 +3258,7 @@ bool of_RELEASE_REG(vthread_t thr, vvp_code_t cp)
// And this is the pointer to be removed. // And this is the pointer to be removed.
vvp_net_ptr_t dst_ptr (net, 2); vvp_net_ptr_t dst_ptr (net, 2);
unlink_from_driver(src, dst_ptr); unlink_from_driver(src, dst_ptr);
} }
// Send a command to this signal to unforce itself. // Send a command to this signal to unforce itself.
vvp_net_ptr_t ptr (net, 3); vvp_net_ptr_t ptr (net, 3);