<commit_before>// Test ya68k2 glue logic

#define F_CPU 1000000 // use internal oscillator, set to 1 MHz

#include <stdint.h>
#include <avr/io.h>
#include <util/delay.h>

////////////////////////////////////////////////////////////////////////
// Definitions
////////////////////////////////////////////////////////////////////////

// Wiring of test circuit:
//
// Simulated CPU control outputs:
//    PD0: CLK
//    PD1: -RST
//    PD2: -AS
//    PD3: -DS
//    PD4: RW
//    PD5: A19
//
// Inputs (reading glue logic outputs):
//    PC0: -ROMEN
//    PC1: -OPORTEN
//    PC2: -DEVOE

#define CTRL_CLK     0
#define CTRL_NRST    1
#define CTRL_NAS     2
#define CTRL_NDS     3
#define CTRL_RW      4
#define CTRL_A19     5

#define SIG_NROMEN   0
#define SIG_NOPORTEN 1
#define SIG_NDEVOE   2

#define PORTB_MASK ((uint8_t)0x07)   // LEDs
#define PORTC_MASK ((uint8_t)0x00)   // Signal inputs (from glue logic PLD)
#define PORTD_MASK ((uint8_t)0x3F)   // Control outputs
<commit_msg>use comment to describe wiring of indicator LEDs<commit_after>// Test ya68k2 glue logic

#define F_CPU 1000000 // use internal oscillator, set to 1 MHz

#include <stdint.h>
#include <avr/io.h>
#include <util/delay.h>

////////////////////////////////////////////////////////////////////////
// Definitions
////////////////////////////////////////////////////////////////////////

// Wiring of test circuit:
//
// Indicator LEDs:
//    PB0: green
//    PB1: yellow
//    PB2: red
//
// Simulated CPU control outputs:
//    PD0: CLK
//    PD1: -RST
//    PD2: -AS
//    PD3: -DS
//    PD4: RW
//    PD5: A19
//
// Inputs (reading glue logic outputs):
//    PC0: -ROMEN
//    PC1: -OPORTEN
//    PC2: -DEVOE

#define CTRL_CLK     0
#define CTRL_NRST    1
#define CTRL_NAS     2
#define CTRL_NDS     3
#define CTRL_RW      4
#define CTRL_A19     5

#define SIG_NROMEN   0
#define SIG_NOPORTEN 1
#define SIG_NDEVOE   2

#define PORTB_MASK ((uint8_t)0x07)   // LEDs
#define PORTC_MASK ((uint8_t)0x00)   // Signal inputs (from glue logic PLD)
#define PORTD_MASK ((uint8_t)0x3F)   // Control outputs

{'fraction_non_alphanumeric': 0.24650938854116514, 'fraction_numerical': 0.043813192103996146, 'mean_word_length': 1.5845771144278606, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2434002', 'n_tokens_mistral': 785, 'n_tokens_neox': 724, 'n_words': 211}