File: automodport_ex.v

package info (click to toggle)
verilog-mode 20161124.fd230e6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,764 kB
  • ctags: 5,143
  • sloc: lisp: 12,430; perl: 293; makefile: 146; sh: 35; fortran: 2
file content (27 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
interface ExampIf
  ( input logic clk );
   logic        req_val;
   logic [7:0]  req_dat;
   clocking mon_clkblk @(posedge clk);
      input 	req_val;
      input	req_dat;
   endclocking
   modport mp(clocking mon_clkblk);
endinterface

module ExampMain
( input clk,
  /*AUTOINOUTMODPORT("ExampIf" "mp")*/
  // Beginning of automatic in/out/inouts (from modport)
  input			req_val,
  input [7:0]		req_dat
  // End of automatics
);

   /*AUTOASSIGNMODPORT("ExampIf" "mp" "inst")*/
   // Beginning of automatic assignments from modport
   assign inst.req_dat = req_dat;
   assign inst.req_val = req_val;
   // End of automatics

endmodule