CDL Modules
apb_peripherals.h File Reference

Modules of various simple APB peripherals. More...

Detailed Description

Modules of various simple APB peripherals.

Copyright (C) 2016-2017, Gavin J Stark. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Header file for the modules for some very simple APB peripherals

Modules

module apb_master_axi ( clock  aclk,
input bit  areset_n,
input t_axi_request  ar,
output bit  awready,
input t_axi_request  aw,
output bit  arready,
output bit  wready,
input t_axi_write_data  w,
input bit  bready,
output t_axi_write_response  b,
input bit  rready,
output t_axi_read_response  r,
output t_apb_request  apb_request,
input t_apb_response  apb_response 
)
module apb_master_mux ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request_0,
output t_apb_response  apb_response_0,
input t_apb_request  apb_request_1,
output t_apb_response  apb_response_1,
output t_apb_request  apb_request,
input t_apb_response  apb_response 
)
Parameters
[in]clkSystem clock
[in]reset_nActive low reset
[in]apb_request_0APB request to master 0
[out]apb_response_0APB response to master 0
[in]apb_request_1APB request to master 1
[out]apb_response_1APB response to master 1
[out]apb_requestAPB request to targets
[in]apb_responseAPB response from targets
module apb_processor ( clock  clk,
input bit  reset_n,
input t_apb_processor_request  apb_processor_request,
output t_apb_processor_response  apb_processor_response,
output t_apb_request  apb_request,
input t_apb_response  apb_response,
output t_apb_rom_request  rom_request,
input bit  rom_data[40] 
)
Parameters
clkClock for the CSR interface; a superset of all targets clock
apb_requestPipelined csr request interface output
apb_responsePipelined csr request interface response
module apb_target_de1_cl_inputs ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
input t_de1_cl_user_inputs  user_inputs 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response
module apb_target_dprintf ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
output t_dprintf_req_4  dprintf_req,
input bit  dprintf_ack 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response
module apb_target_gpio ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
output bit  gpio_output[16],
output bit  gpio_output_enable[16],
input bit  gpio_input[16],
output bit  gpio_input_event 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response
module apb_target_led_ws2812 ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
input bit  divider_400ns_in[8],
output bit  led_chain 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response
divider_400ns_inDefault value for divider_400ns
module apb_target_ps2_host ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
input t_ps2_pins  ps2_in,
output t_ps2_pins  ps2_out 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response
ps2_inPin values from the outside
ps2_outPin values to drive - 1 means float high, 0 means pull low
module apb_target_rv_timer ( clock  clk,
input bit  reset_n,
input t_timer_control  timer_control,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
output t_timer_value  timer_value 
)
Parameters
clkSystem clock
reset_nActive low reset
timer_controlControl of the timer
apb_requestAPB request
apb_responseAPB response
module apb_target_sram_interface ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
output bit  sram_ctrl[32],
output t_sram_access_req  sram_access_req,
input t_sram_access_resp  sram_access_resp 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response
sram_ctrlSRAM control for whatever purpose
sram_access_reqSRAM access request
sram_access_respSRAM access response
module apb_target_timer ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
output bit  timer_equalled[3] 
)
Parameters
clkSystem clock
reset_nActive low reset
apb_requestAPB request
apb_responseAPB response