3 #######====== Interface declarations =======#########
5 method Action cell{0}_mux(Bit#('''+str(N_MUX
)+''') in);'''
8 (*always_ready*) method Bit#(1) io_outputval_{0};
9 (*always_ready*) method Bit#(1) io_output_en_{0};
10 (*always_ready*) method Bit#(1) io_input_en_{0};
11 (*always_ready*) method Bit#(1) io_pullup_en_{0};
12 (*always_ready*) method Bit#(1) io_pulldown_en_{0};
13 (*always_ready*) method Bit#(1) io_drivestrength_{0};
14 (*always_ready*) method Bit#(1) io_pushpull_en_{0};
15 (*always_ready*) method Bit#(1) io_opendrain_en_{0};
16 (*always_ready,always_enabled,result="io"*) method Action io_inputval_{0}(Bit#(1) in);
18 #== Peripheral Interface definitions ==#
19 # these are the interface of the peripherals to the pin mux
20 # Outputs from the peripherals will be inputs to the pinmux
21 # module. Hence the change in direction for most pins
23 uartinterface_decl
='''
24 (*always_ready,always_enabled*) method Action tx_{0}(Bit#(1) in);
25 (*always_ready,always_enabled*) method Bit#(1) rx_{0};
29 (*always_ready,always_enabled*) method Action sclk_{0} (Bit#(1) in);
30 (*always_ready,always_enabled*) method Action mosi_{0} (Bit#(1) in);
31 (*always_ready,always_enabled*) method Action ss_{0} (Bit#(1) in);
32 (*always_ready,always_enabled*) method Bit#(1) miso_{0};
36 (*always_ready,always_enabled*) method Action sda{0}_out (Bit#(1) in);
37 (*always_ready,always_enabled*) method Action sda{0}_outen (Bit#(1) in);
38 (*always_ready,always_enabled*) method Bit#(1) sda{0}_in;
39 (*always_ready,always_enabled*) method Action scl{0}_out (Bit#(1) in);
40 (*always_ready,always_enabled*) method Action scl{0}_outen (Bit#(1) in);
41 (*always_ready,always_enabled*) method Bit#(1) scl{0}_in;
43 #=======================================#