fg_ctrl.rmh

来自「和picoblaze完全兼容的mcu ip core」· RMH 代码 · 共 1,476 行 · 第 1/5 页

RMH
1,476
字号
/* Symbol Table */// BCD_digit0 = CONSTANT: 3// BCD_digit1 = CONSTANT: 4// BCD_digit2 = CONSTANT: 5// BCD_digit3 = CONSTANT: 6// BCD_digit4 = CONSTANT: 7// BCD_digit5 = CONSTANT: 8// BCD_digit6 = CONSTANT: 9// BCD_digit7 = CONSTANT: 10// BCD_digit8 = CONSTANT: 11// BCD_digit_convert = LABEL: 241// BCD_to_integer = LABEL: 229// DDS_control0 = CONSTANT: 28// DDS_control0_port = CONSTANT: 2// DDS_control1 = CONSTANT: 29// DDS_control1_port = CONSTANT: 4// DDS_control2 = CONSTANT: 30// DDS_control2_port = CONSTANT: 8// DDS_control3 = CONSTANT: 31// DDS_control3_port = CONSTANT: 16// DDS_scaling = CONSTANT: 32// DDS_scaling_port = CONSTANT: 32// ISR = LABEL: 568// ISR_preserve_s0 = CONSTANT: 1// LCD_DB4 = CONSTANT: 16// LCD_DB5 = CONSTANT: 32// LCD_DB6 = CONSTANT: 64// LCD_DB7 = CONSTANT: 128// LCD_E = CONSTANT: 1// LCD_RS = CONSTANT: 4// LCD_RW = CONSTANT: 2// LCD_clear = LABEL: 550// LCD_cursor = LABEL: 555// LCD_drive = CONSTANT: 8// LCD_input_port = CONSTANT: 1// LCD_output_port = CONSTANT: 64// LCD_pulse_E = LABEL: 466// LCD_read_DB4 = CONSTANT: 16// LCD_read_DB5 = CONSTANT: 32// LCD_read_DB6 = CONSTANT: 64// LCD_read_DB7 = CONSTANT: 128// LCD_read_data8 = LABEL: 508// LCD_reset = LABEL: 533// LCD_shift_left = LABEL: 565// LCD_write_data = LABEL: 491// LCD_write_inst4 = LABEL: 472// LCD_write_inst8 = LABEL: 476// LED0 = CONSTANT: 1// LED1 = CONSTANT: 2// LED2 = CONSTANT: 4// LED3 = CONSTANT: 8// LED4 = CONSTANT: 16// LED5 = CONSTANT: 32// LED6 = CONSTANT: 64// LED7 = CONSTANT: 128// LED_pattern = CONSTANT: 2// LED_port = CONSTANT: 128// blank_100M_digit = LABEL: 190// blank_10M_digit = LABEL: 196// character_0 = CONSTANT: 48// character_1 = CONSTANT: 49// character_2 = CONSTANT: 50// character_3 = CONSTANT: 51// character_4 = CONSTANT: 52// character_5 = CONSTANT: 53// character_6 = CONSTANT: 54// character_7 = CONSTANT: 55// character_8 = CONSTANT: 56// character_9 = CONSTANT: 57// character_A = CONSTANT: 65// character_B = CONSTANT: 66// character_BS = CONSTANT: 8// character_C = CONSTANT: 67// character_CR = CONSTANT: 13// character_D = CONSTANT: 68// character_E = CONSTANT: 69// character_F = CONSTANT: 70// character_G = CONSTANT: 71// character_H = CONSTANT: 72// character_I = CONSTANT: 73// character_J = CONSTANT: 74// character_K = CONSTANT: 75// character_L = CONSTANT: 76// character_M = CONSTANT: 77// character_N = CONSTANT: 78// character_O = CONSTANT: 79// character_P = CONSTANT: 80// character_Q = CONSTANT: 81// character_R = CONSTANT: 82// character_S = CONSTANT: 83// character_T = CONSTANT: 84// character_U = CONSTANT: 85// character_V = CONSTANT: 86// character_W = CONSTANT: 87// character_X = CONSTANT: 88// character_Y = CONSTANT: 89// character_Z = CONSTANT: 90// character_a = CONSTANT: 97// character_b = CONSTANT: 98// character_c = CONSTANT: 99// character_colon = CONSTANT: 58// character_comma = CONSTANT: 44// character_d = CONSTANT: 100// character_divide = CONSTANT: 47// character_dollar = CONSTANT: 36// character_e = CONSTANT: 101// character_equals = CONSTANT: 61// character_exclaim = CONSTANT: 33// character_f = CONSTANT: 102// character_g = CONSTANT: 103// character_greater_than = CONSTANT: 62// character_h = CONSTANT: 104// character_i = CONSTANT: 105// character_j = CONSTANT: 106// character_k = CONSTANT: 107// character_l = CONSTANT: 108// character_less_than = CONSTANT: 60// character_m = CONSTANT: 109// character_minus = CONSTANT: 45// character_n = CONSTANT: 110// character_o = CONSTANT: 111// character_p = CONSTANT: 112// character_plus = CONSTANT: 43// character_q = CONSTANT: 113// character_question = CONSTANT: 63// character_r = CONSTANT: 114// character_s = CONSTANT: 115// character_semi_colon = CONSTANT: 59// character_space = CONSTANT: 32// character_stop = CONSTANT: 46// character_t = CONSTANT: 116// character_u = CONSTANT: 117// character_v = CONSTANT: 118// character_w = CONSTANT: 119// character_x = CONSTANT: 120// character_y = CONSTANT: 121// character_z = CONSTANT: 122// cold_start = LABEL: 0// compute_DDS_words = LABEL: 132// cursor_position = CONSTANT: 16// dec_borrow = LABEL: 91// dec_digit = LABEL: 85// delay_1ms = LABEL: 451// delay_1s = LABEL: 461// delay_1us = LABEL: 442// delay_1us_constant = CONSTANT: 11// delay_20ms = LABEL: 456// delay_40us = LABEL: 446// disp32_loop = LABEL: 389// disp_1M_digit = LABEL: 197// disp_Frequency = LABEL: 395// disp_Generator = LABEL: 414// display_3_digits = LABEL: 216// display_DDS_data = LABEL: 349// display_digit = LABEL: 223// display_freq = LABEL: 180// display_hex_32_bit = LABEL: 388// display_hex_byte = LABEL: 382// display_space = LABEL: 226// drive_DDS_words = LABEL: 169// edit_digit_pointer = CONSTANT: 17// edit_display = LABEL: 70// edit_mode = LABEL: 69// edit_point_update = LABEL: 66// edit_wait = LABEL: 74// end_edit_mode = LABEL: 123// fill_max = LABEL: 118// fill_min = LABEL: 99// frequency0 = CONSTANT: 12// frequency1 = CONSTANT: 13// frequency2 = CONSTANT: 14// frequency3 = CONSTANT: 15// hex_byte_to_ASCII = LABEL: 365// hex_to_ASCII = LABEL: 377// inc_carry = LABEL: 110// inc_digit = LABEL: 104// move_left = LABEL: 47// move_mode = LABEL: 31// move_right = LABEL: 57// move_wait = LABEL: 35// next_BCD_to_int_digit = LABEL: 240// next_digit_value = LABEL: 257// normalise_loop = LABEL: 144// number_char = LABEL: 380// product0 = CONSTANT: 18// product1 = CONSTANT: 19// product2 = CONSTANT: 20// product3 = CONSTANT: 21// product4 = CONSTANT: 22// product5 = CONSTANT: 23// product6 = CONSTANT: 24// product7 = CONSTANT: 25// product8 = CONSTANT: 26// product9 = CONSTANT: 27// product_shift = LABEL: 316// rotary_event = CONSTANT: 128// rotary_left = CONSTANT: 1// rotary_port = CONSTANT: 0// rotary_press = CONSTANT: 2// rotary_status = CONSTANT: 0// s0 = REGISTER: 0// s1 = REGISTER: 1// s2 = REGISTER: 2// s3 = REGISTER: 3// s4 = REGISTER: 4// s5 = REGISTER: 5// s6 = REGISTER: 6// s7 = REGISTER: 7// s8 = REGISTER: 8// s9 = REGISTER: 9// sA = REGISTER: 10// sB = REGISTER: 11// sC = REGISTER: 12// sD = REGISTER: 13// sE = REGISTER: 14// sF = REGISTER: 15// scale_constant0 = CONSTANT: 98// scale_constant1 = CONSTANT: 132// scale_constant2 = CONSTANT: 17// scale_constant3 = CONSTANT: 119// scale_constant4 = CONSTANT: 204// scale_constant5 = CONSTANT: 171// scale_frequency = LABEL: 281// scale_mult_bit = LABEL: 293// set_line2 = LABEL: 561// set_max_value = LABEL: 116// set_min_value = LABEL: 97// shift80_left = LABEL: 161// skip_left = LABEL: 55// skip_right = LABEL: 65// store_DDS_words = LABEL: 154// threedigit_loop = LABEL: 217// wait_1ms = LABEL: 452// wait_1s = LABEL: 462// wait_1us = LABEL: 443// wait_20ms = LABEL: 457// wait_40us = LABEL: 447// wait_switch_release = LABEL: 125/* Program Code */// #1: ; KCPSM3 Program - Control and calculation for Frequency Generator design using the// #2: ;                 Spartan-3E Starter Kit.// #3: ;// #4: ; Interfaces with the rotary encoder and LCD display to enable a frequency to be set.// #5: ; Converts the BCD frequency value into a binary integer and then performs the high// #6: ; precision calculation necessary to derive the control numbers required by the high// #7: ; performance Direct Digital Synthesis (DDS) circuit implemented in hardware.// #8: ;// #9: ; LEDs are connected and used as edit mode indicators.// #10: ;// #11: ; Substantial comments are included in line with the code below and should be used// #12: ; in conjunction with the documentation provided with the complete reference design.// #13: ;// #14: ;// #15: ;// #16: ; Ken Chapman - Xilinx Ltd// #17: ;// #18: ; Version v1.00 - 13th July 2006// #19: ;// #20: ;**************************************************************************************// #21: ;Port definitions// #22: ;**************************************************************************************// #23: ;// #24: ;// #25: ;// #26: CONSTANT(LED_port,128) ;8 simple LEDs// #27: CONSTANT(LED0,1) ;     LED 0 - bit0// #28: CONSTANT(LED1,2) ;         1 - bit1// #29: CONSTANT(LED2,4) ;         2 - bit2// #30: CONSTANT(LED3,8) ;         3 - bit3// #31: CONSTANT(LED4,16) ;         4 - bit4// #32: CONSTANT(LED5,32) ;         5 - bit5// #33: CONSTANT(LED6,64) ;         6 - bit6// #34: CONSTANT(LED7,128) ;         7 - bit7// #35: ;// #36: ;// #37: CONSTANT(rotary_port,0) ;Read status of rotary encoder// #38: CONSTANT(rotary_left,1) ; Direction of last move Left=1 Right=0  - bit0// #39: CONSTANT(rotary_press,2) ;     Centre press contact (active High) - bit1// #40: ;// #41: ;// #42: ;LCD interface ports// #43: ;// #44: ;The master enable signal is not used by the LCD display itself// #45: ;but may be required to confirm that LCD communication is active.// #46: ;This is required on the Spartan-3E Starter Kit if the StrataFLASH// #47: ;is used because it shares the same data pins and conflicts must be avoided.// #48: ;// #49: CONSTANT(LCD_output_port,64) ;LCD character module output data and control// #50: CONSTANT(LCD_E,1) ;   active High Enable        E - bit0// #51: CONSTANT(LCD_RW,2) ;   Read=1 Write=0           RW - bit1// #52: CONSTANT(LCD_RS,4) ;   Instruction=0 Data=1     RS - bit2// #53: CONSTANT(LCD_drive,8) ;   Master enable (active High) - bit3// #54: CONSTANT(LCD_DB4,16) ;   4-bit              Data DB4 - bit4// #55: CONSTANT(LCD_DB5,32) ;   interface          Data DB5 - bit5// #56: CONSTANT(LCD_DB6,64) ;                      Data DB6 - bit6

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?