CDL Modules
Files
via6522

Files

file  via6522.cdl
 CDL implementation of a 6522 versatile interface adaptor (VIA)
 

Detailed Description

Modules

module via6522::via6522 ( clock  clk,
clock  clk_io,
input bit  reset_n,
input bit  read_not_write,
input bit  chip_select,
input bit  chip_select_n,
input bit  address[4],
input bit  data_in[8],
output bit  data_out[8],
output bit  irq_n,
input bit  ca1,
input bit  ca2_in,
output bit  ca2_out,
output bit  pa_out[8],
input bit  pa_in[8],
input bit  cb1,
input bit  cb2_in,
output bit  cb2_out,
output bit  pb_out[8],
input bit  pb_in[8] 
)

Control registers

Parameters
[in]clk1MHz clock rising when bus cycle finishes
[in]clk_io1MHz clock rising when I/O should be captured - can be antiphase to clk
[in]read_not_writeIndicates a read transaction if asserted and chip selected
[in]chip_selectActive high chip select
[in]chip_select_nActive low chip select
[in]addressChanges during phase 1 (phi[0] high) with address to read or write
[in]data_inData in (from CPU)
[out]data_outRead data out (to CPU)
[out]irq_nActive low interrupt
[in]ca1Port a control 1 in
[in]ca2_inPort a control 2 in
[out]ca2_outPort a control 2 out
[out]pa_outPort a data out
[in]pa_inPort a data in
[in]cb1Port b control 1 in
[in]cb2_inPort b control 2 in
[out]cb2_outPort b control 2 out
[out]pb_outPort b data out
[in]pb_inPort b data in