summaryrefslogtreecommitdiff
path: root/csim/load.c
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-05 13:47:12 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-05 13:47:12 +0100
commit07b7563e0748b1aff6f4d28b0172095b2fdcdfcc (patch)
treea5e390cfad822d87e6874f4e719edda445a32585 /csim/load.c
parent94e88e887cf2ee4c6b445924d26e134a90bcbd50 (diff)
downloadSystDigit-Projet-07b7563e0748b1aff6f4d28b0172095b2fdcdfcc.tar.gz
SystDigit-Projet-07b7563e0748b1aff6f4d28b0172095b2fdcdfcc.zip
Added netlist simplification passes (not yet quite complete !)
Diffstat (limited to 'csim/load.c')
-rw-r--r--csim/load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/csim/load.c b/csim/load.c
index a7e6cac..7971a71 100644
--- a/csim/load.c
+++ b/csim/load.c
@@ -35,10 +35,10 @@ t_value read_bool(FILE *stream, t_value *mask) {
void read_arg(FILE *stream, t_arg *dest) {
dest->mask = 0;
- if (fscanf(stream, "$") > 0) {
- dest->Val = read_bool(stream, &dest->mask);
+ if (fscanf(stream, "$%d ", &(dest->SrcVar))) {
+ // ok, value is read
} else {
- fscanf(stream, "%d ", &(dest->SrcVar));
+ dest->Val = read_bool(stream, &dest->mask);
}
}