summaryrefslogtreecommitdiff
path: root/csim/sim.c
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-03 19:05:10 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-03 19:05:10 +0100
commit1ff268ab13dd299c4cdc1e379df5397bd6a394e3 (patch)
tree014db93062f26cdfe2d2639fd833afd554e94a66 /csim/sim.c
parentc46fe12e47c405fbb03f0c93121402d873bc470e (diff)
downloadSystDigit-Projet-1ff268ab13dd299c4cdc1e379df5397bd6a394e3.tar.gz
SystDigit-Projet-1ff268ab13dd299c4cdc1e379df5397bd6a394e3.zip
Added simulator monitor tool.
Diffstat (limited to 'csim/sim.c')
-rw-r--r--csim/sim.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/csim/sim.c b/csim/sim.c
index 04cad15..f91ac75 100644
--- a/csim/sim.c
+++ b/csim/sim.c
@@ -52,6 +52,17 @@ t_machine *init_machine (t_program *p) {
return m;
}
+void machine_banner(t_machine *m, FILE *stream) {
+ int i;
+ fprintf(stream, "%d %d\n", m->prog->n_inputs, m->prog->n_outputs);
+ for (i = 0; i < m->prog->n_inputs; i++) {
+ fprintf(stream, "%d %s\n",
+ m->prog->vars[m->prog->inputs[i]].size,
+ m->prog->vars[m->prog->inputs[i]].name);
+ }
+ fprintf(stream, "\n");
+}
+
void read_inputs(t_machine *m, FILE *stream) {
/* FORMAT :
For each input in the list, *in the order specified*,