diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-03 08:17:40 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-03 08:17:40 +0100 |
commit | 1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68 (patch) | |
tree | 210ffc156c83f04fb0c61a40b4f9037d7ba8a7e1 /test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c | |
parent | 222c9047d61961db9c6b19fed5ca49829223fd33 (diff) | |
parent | 12be46d59a2483a10d77fa8ee67f7e0ca1bd702f (diff) | |
download | compcert-kvx-1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68.tar.gz compcert-kvx-1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68.zip |
Merge branch 'mppa-cse2' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-work
Diffstat (limited to 'test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c')
-rw-r--r-- | test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c new file mode 100644 index 00000000..d1a01268 --- /dev/null +++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c @@ -0,0 +1,63 @@ +/* This file was generated by lv6 version master.737 (2727a7744111c84f7984634d2bd3ad6f7c6c7ff9). */ +/* lv6 -en -2cgc heater_control.lus -n heater_control */ +/* on vanoise the 15/05/2019 at 13:20:10 */ + +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include "../dm_random.c" +#include "../clock.h" +#include "heater_control_heater_control.h" + +/* MACROS DEFINITIONS ****************/ +#ifndef TT +#define TT "1" +#endif +#ifndef FF +#define FF "0" +#endif +#ifndef BB +#define BB "bottom" +#endif +#ifdef CKCHECK +/* set this macro for testing output clocks */ +#endif + +/* Standard Input procedures **************/ +_real _get_real(char* n){ + return (dm_random_uint32()%70000U) * 1E-3 -20.0; +} +/* Standard Output procedures **************/ +void _put_bool(char* n, _boolean b){ + printf("%s: %d\n", n, b); +} +/* Main procedure *************************/ +int main(){ + _real T; + _real T1; + _real T2; + _real T3; + _boolean Heat_on; + heater_control_heater_control_ctx_type ctx_struct; + heater_control_heater_control_ctx_type* ctx = &ctx_struct; + + clock_prepare(); + clock_start(); + + heater_control_heater_control_ctx_init(ctx); + + /* Main loop */ + for(int step=0; step<1000; step++){ + T = _get_real("T"); + T1 = _get_real("T1"); + T2 = _get_real("T2"); + T3 = _get_real("T3"); + heater_control_heater_control_step(T,T1,T2,T3,&Heat_on,ctx); + // _put_bool("Heat_on", Heat_on); + } + + clock_stop(); + print_total_clock(); + + return 1; +} |