package hardcaml_axi

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file lite_ports_intf.ml

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
open! Base
open! Hardcaml

(** AXI4-lite master interface.

    Drives data on 3 chanels

    - write address
    - write data
    - read address

    Receives data on 2 channels

    - write response
    - read data

    Handshakes using [valid] and [ready] are performed on each
    channel. *)
module type Master_to_slave = sig
  type 'a t =
    { awaddr : 'a (** Write address. *)
    ; awvalid : 'a (** Write address valid. *)
    ; awprot : 'a (** Write address protection bits.  Not generally used. *)
    ; wdata : 'a (** Write data. *)
    ; wstrb : 'a (** Valid write data bytes. *)
    ; wvalid : 'a (** Write data valid. *)
    ; bready : 'a (** Write response ready *)
    ; araddr : 'a (** Read address *)
    ; arvalid : 'a (** Read address valid. *)
    ; arprot : 'a (** Read address protection bits.  Not generally used. *)
    ; rready : 'a (** Read data ready. *)
    }
  [@@deriving hardcaml]

  include Master_slave_bus_config.S
end

(** AXI4-lite slave interface.

    Receives read/write addresses and write data and responds with read data and
    read/write error conditions.

    Errors are encoded as

    - 00 OKAY
    - 01 EXOKAY - not used in lite version of protocol
    - 10 SLVERR - slave indicates an error - master generally retries
    - 11 DECERR - AXI interconnect error *)
module type Slave_to_master = sig
  type 'a t =
    { awready : 'a (** Write address ready. *)
    ; wready : 'a (** Write data ready. *)
    ; bresp : 'a (** Write response. *)
    ; bvalid : 'a (** Write response valid. *)
    ; arready : 'a (** Read address ready. *)
    ; rdata : 'a (** Read data *)
    ; rresp : 'a (** Read response *)
    ; rvalid : 'a (** Read data valid. *)
    }
  [@@deriving hardcaml]

  include Master_slave_bus_config.S
end

module type Lite_ports = sig
  module type Master_to_slave = Master_to_slave
  module type Slave_to_master = Slave_to_master

  module Master_to_slave (X : Master_slave_bus_config.S) : Master_to_slave
  module Slave_to_master (X : Master_slave_bus_config.S) : Slave_to_master
end
OCaml

Innovation. Community. Security.