CDL Modules
Data Structures | Namespaces | Enumerations
via6522.cdl File Reference

CDL implementation of a 6522 versatile interface adaptor (VIA) More...

Detailed Description

CDL implementation of a 6522 versatile interface adaptor (VIA)

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.

This is currently somewhat messy in the clocking - which clock edges do what. The 6522 was not well documented, so it is not clear that this correctly handles the timers either.

Data Structures

struct  via6522::t_port
 
struct  via6522::t_port_edges
 
struct  via6522::t_pcr
 
struct  via6522::t_timer_value
 
struct  via6522::t_timer
 
struct  via6522::t_acr
 
struct  via6522::t_irq
 

Namespaces

 via6522
 

Enumerations

enum  via6522::t_edge {
  via6522::ctl_negedge =1,
  via6522::ctl_posedge =0
}
 
enum  via6522::t_c2_ctl {
  via6522::input_negedge,
  via6522::input_negedge_independent,
  via6522::input_posedge,
  via6522::input_posedge_independent,
  via6522::output_handshake,
  via6522::output_pulse,
  via6522::output_high,
  via6522::output_low
}
 
enum  via6522::t_read_action {
  via6522::read_action_none,
  via6522::read_action_port_a_handshake,
  via6522::read_action_port_b_handshake,
  via6522::read_action_clear_timer_1_irq,
  via6522::read_action_clear_timer_2_irq
}
 
enum  via6522::t_write_action {
  via6522::write_action_none,
  via6522::write_action_ora_handshake,
  via6522::write_action_orb_handshake,
  via6522::write_action_ora,
  via6522::write_action_ddra,
  via6522::write_action_ddrb,
  via6522::write_action_t1ll_write,
  via6522::write_action_t1lh_write,
  via6522::write_action_t1ch_write,
  via6522::write_action_t2ll_write,
  via6522::write_action_t2ch_write,
  via6522::write_action_ier,
  via6522::write_action_ifr,
  via6522::write_action_sr,
  via6522::write_action_pcr,
  via6522::write_action_acr
}
 
enum  via6522::t_address {
  via6522::addr_orb_irb = 0,
  via6522::addr_ora_ira = 1,
  via6522::addr_ddrb = 2,
  via6522::addr_ddra = 3,
  via6522::addr_t1c_l = 4,
  via6522::addr_t1c_h = 5,
  via6522::addr_t1l_l = 6,
  via6522::addr_t1l_h = 7,
  via6522::addr_t2c_l = 8,
  via6522::addr_t2c_h = 9,
  via6522::addr_sr = 10,
  via6522::addr_acr = 11,
  via6522::addr_pcr = 12,
  via6522::addr_ifr = 13,
  via6522::addr_ier = 14,
  via6522::addr_ora_ira_no_hs = 15
}