⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cf9222.78k

📁 继续上传NEC单片机的例子程序,很好的东东.我在日电电子中国培训的材料.共享.
💻 78K
📖 第 1 页 / 共 3 页
字号:
busname_uart6_asis = BusSlaveName("ASIS6");
busname_uart6_asis |= uart6.BusSlaveIF("ASIS");
busname_uart6_txb = BusSlaveName("TXB6");
busname_uart6_txb |= uart6.BusSlaveIF("TXB");
#busname_uart6_asif = BusSlaveName("ASIF6");
#busname_uart6_asif |= uart6.BusSlaveIF("ASIF");
busname_uart6_cksr = BusSlaveName("CKSR6");
busname_uart6_cksr |= uart6.BusSlaveIF("CKSR");
busname_uart6_brgc = BusSlaveName("BRGC6");
busname_uart6_brgc |= uart6.BusSlaveIF("BRGC");
busname_uart6_asicl = BusSlaveName("ASICL6");
busname_uart6_asicl |= uart6.BusSlaveIF("ASICL");
#busname_uart6_txs = BusSlaveName("TXS6");
#busname_uart6_txs |= uart6.BusSlaveIF("TXS");

#------	ad	---------------------------------------------------------
busname_adctl0_adm = BusSlaveName("ADM");
busname_adctl0_adm |= adctl0.BusSlaveIF("ADM");
busname_adctl0_ads = BusSlaveName("ADS");
busname_adctl0_ads |= adctl0.BusSlaveIF("ADS");
busname_adctl0_adcr = BusSlaveName("ADCR");
busname_adctl0_adcr |= adctl0.BusSlaveIF("ADCR");
busname_adctl0_adcr1 = BusSlaveName("ADCR");
busname_adctl0_adcr1 |= adctl0.BusSlaveIF("ADCR1");

#------	intc	---------------------------------------------------------
busname_intc_if0 = BusSlaveName("IF0");
busname_intc_if0 |= intc.BusSlaveIF("IF0");
busname_intc_if1 = BusSlaveName("IF1");
busname_intc_if1 |= intc.BusSlaveIF("IF1");
busname_intc_mk0 = BusSlaveName("MK0");
busname_intc_mk0 |= intc.BusSlaveIF("MK0");
busname_intc_mk1 = BusSlaveName("MK1");
busname_intc_mk1 |= intc.BusSlaveIF("MK1");
busname_intc_intm0 = BusSlaveName("INTM0");
busname_intc_intm0 |= intc.BusSlaveIF("INTM0");
busname_intc_intm1 = BusSlaveName("INTM1");
busname_intc_intm1 |= intc.BusSlaveIF("INTM1");

#------	poclvi	---------------------------------------------------------
busname_poclvi_lvim = BusSlaveName("LVIM");
busname_poclvi_lvim |= poclvi.BusSlaveIF("LVIM");
busname_poclvi_lvis = BusSlaveName("LVIS");
busname_poclvi_lvis |= poclvi.BusSlaveIF("LVIS");

#------	port	---------------------------------------------------------
# port0
#busname_port_p0 = BusSlaveName("P0");
#busname_port_p0 |= port.BusSlaveIF("P0");
#busname_port_pm0 = BusSlaveName("PM0");
#busname_port_pm0 |= port.BusSlaveIF("PM0");
# port2
busname_port_p2 = BusSlaveName("P2");
busname_port_p2 |= port.BusSlaveIF("P2");
busname_port_pm2 = BusSlaveName("PM2");
busname_port_pm2 |= port.BusSlaveIF("PM2");
busname_port_pmc2 = BusSlaveName("PMC2");
busname_port_pmc2 |= port.BusSlaveIF("PMC2");
# port3
busname_port_p3 = BusSlaveName("P3");
busname_port_p3 |= port.BusSlaveIF("P3");
busname_port_pm3 = BusSlaveName("PM3");
busname_port_pm3 |= port.BusSlaveIF("PM3");
busname_port_pu3 = BusSlaveName("PU3");
busname_port_pu3 |= port.BusSlaveIF("PU3");
# port4
busname_port_p4 = BusSlaveName("P4");
busname_port_p4 |= port.BusSlaveIF("P4");
busname_port_pm4 = BusSlaveName("PM4");
busname_port_pm4 |= port.BusSlaveIF("PM4");
busname_port_pu4 = BusSlaveName("PU4");
busname_port_pu4 |= port.BusSlaveIF("PU4");
# port12
busname_port_p12 = BusSlaveName("P12");
busname_port_p12 |= port.BusSlaveIF("P12");
busname_port_pm12 = BusSlaveName("PM12");
busname_port_pm12 |= port.BusSlaveIF("PM12");
busname_port_pu12 = BusSlaveName("PU12");
busname_port_pu12 |= port.BusSlaveIF("PU12");
# port13
busname_port_p13 = BusSlaveName("P13");
busname_port_p13 |= port.BusSlaveIF("P13");

#------	cgx	---------------------------------------------------------
busname_cgx_pcc = BusSlaveName("PCC");
busname_cgx_pcc |= cgx.BusSlaveIF("PCC");
busname_cgx_ppcc = BusSlaveName("PPCC");
busname_cgx_ppcc |= cgx.BusSlaveIF("PPCC");
busname_cgx_lsrcm = BusSlaveName("LSRCM");
busname_cgx_lsrcm |= cgx.BusSlaveIF("LSRCM");
busname_cgx_hsrcm = BusSlaveName("HSRCM");
busname_cgx_hsrcm |= cgx.BusSlaveIF("HSRCM");
busname_cgx_osts = BusSlaveName("OSTS");
busname_cgx_osts |= cgx.BusSlaveIF("OSTS");
#busname_cgx_sckm = BusSlaveName("SCKM");
#busname_cgx_sckm |= cgx.BusSlaveIF("SCKM");
#busname_cgx_css = BusSlaveName("CSS");
#busname_cgx_css |= cgx.BusSlaveIF("CSS");
busname_cgx_resf = BusSlaveName("RESF");
busname_cgx_resf |= cgx.BusSlaveIF("RESF");

#------	wdt	---------------------------------------------------------
busname_wdt_wdtm = BusSlaveName("WDTM");
busname_wdt_wdtm |= cgx.BusSlaveIF("WDTM");
busname_wdt_wdte = BusSlaveName("WDTE");
busname_wdt_wdte |= cgx.BusSlaveIF("WDTE");

#========================================================================
#	Port name
#========================================================================

#------	cgx	---------------------------------------------------------
#portname_cgx_resetz = PortName("RESET");
#portname_cgx_resetz |= cgx.Port("RESETZ");

#------	port	---------------------------------------------------------
# port0
portname_port_p00 = PortName("P00");
portname_port_p00 |= port.Port("P00");
portname_port_p01 = PortName("P01");
portname_port_p01 |= port.Port("P01");
portname_port_p02 = PortName("P02");
portname_port_p02 |= port.Port("P02");
portname_port_p03 = PortName("P03");
portname_port_p03 |= port.Port("P03");
# port2
portname_port_p20 = PortName("P20/ANI0");
portname_port_p20 |= port.Port("P20");
portname_port_p21 = PortName("P21/ANI1");
portname_port_p21 |= port.Port("P21");
portname_port_p22 = PortName("P22/ANI2");
portname_port_p22 |= port.Port("P22");
portname_port_p23 = PortName("P23/ANI3");
portname_port_p23 |= port.Port("P23");
# port3
portname_port_p30 = PortName("P30/TI000/INTP0");
portname_port_p30 |= port.Port("P30");
portname_port_p31 = PortName("P31/TI010/TO000/INTP2");
portname_port_p31 |= port.Port("P31");
portname_port_p32 = PortName("P32");
portname_port_p32 |= port.Port("P32");
portname_port_p33 = PortName("P33");
portname_port_p33 |= port.Port("P33");
portname_port_p34 = PortName("P34/N_RESET");
portname_port_p34 |= port.Port("P34");
# port4
portname_port_p40 = PortName("P40");
portname_port_p40 |= port.Port("P40");
portname_port_p41 = PortName("P41/INTP3");
portname_port_p41 |= port.Port("P41");
portname_port_p42 = PortName("P42/TOH1");
portname_port_p42 |= port.Port("P42");
portname_port_p43 = PortName("P43/TXD6/INTP1");
portname_port_p43 |= port.Port("P43");
portname_port_p44 = PortName("P44/RXD6");
portname_port_p44 |= port.Port("P44");
portname_port_p45 = PortName("P45");
portname_port_p45 |= port.Port("P45");
portname_port_p46 = PortName("P46");
portname_port_p46 |= port.Port("P46");
portname_port_p47 = PortName("P47");
portname_port_p47 |= port.Port("P47");
# port12
portname_port_p120 = PortName("P120");
portname_port_p120 |= port.Port("P120");
portname_port_p121 = PortName("P121/X1");
portname_port_p121 |= port.Port("P121");
portname_port_p122 = PortName("P122/X2");
portname_port_p122 |= port.Port("P122");
portname_port_p123 = PortName("P123");
portname_port_p123 |= port.Port("P123");
# port13
portname_port_p130 = PortName("P130");
portname_port_p130 |= port.Port("P130");
# ANI
portname_port_avref = PortName("AVREF");
portname_port_avref |= adctl0.Port("ADREF");
# VSB Bus
busname_vsb = BusMasterName("VSB");busname_vsb |= cpu.BusMasterIF("VSB");.C2

#------	Simulator GUI --------------------------------------------------------
browsewave = DeviceWindowsGUI("BROWSEWAVE","");
editwave = DeviceWindowsGUI("SIGNALDATAEDITOR","");
stdio = DeviceWindowsGUI("STDIO","-a=0xf000 -prj=stdio");
panel = DeviceWindowsGUI("IOPANEL","-fixed_high_pin=FIXED_HIGH -fixed_low_pin=FIXED_LOW");
serial = DeviceWindowsGUI("SERIAL","-prj=serial -uart=UART00/TXD0:RXD0");

#------	serial port connection -----------------------------------------------
wire_serial_uart0_txd = Wire(1);
wire_serial_uart0_txd += serial.Port("TXD0");
wire_serial_uart0_txd += cpu.Port("P44/RXD6");

wire_serial_uart0_rxd = Wire(1);
wire_serial_uart0_rxd += serial.Port("RXD0");
wire_serial_uart0_rxd += cpu.Port("P43/TXD6/INTP1");

#------	GUI port connection --------------------------------------------------
wire_gui_1 = Wire(1);
wire_gui_1 += cpu.DebuggerPseudoPort("debugger_pseudo_pin_reset_notice");
wire_gui_1 += browsewave.Port("gui_pseudo_pin_reset_notice");
wire_gui_1 += panel.Port("gui_pseudo_pin_reset_notice");
wire_gui_1 += editwave.Port("model_pseudo_pin_reset_notice");
wire_gui_1 += stdio.Port("model_pseudo_pin_reset_notice");
wire_gui_1 += serial.Port("model_pseudo_pin_reset_notice");

wire_gui_2 = Wire(1);
wire_gui_2 += cpu.DebuggerPseudoPort("debugger_pseudo_pin_break_notice");
wire_gui_2 += browsewave.Port("gui_pseudo_pin_break_notice");
wire_gui_2 += panel.Port("gui_pseudo_pin_break_notice");
wire_gui_2 += editwave.Port("model_pseudo_pin_break_notice");

wire_gui_3 = Wire(1);
wire_gui_3 += cpu.DebuggerPseudoPort("debugger_pseudo_pin_run_notice");
wire_gui_3 += browsewave.Port("gui_pseudo_pin_run_notice");
wire_gui_3 += editwave.Port("model_pseudo_pin_run_notice");

wire_gui_4 = Wire(1);
wire_gui_4 += cpu.DebuggerPseudoPort("debugger_pseudo_pin_load_indication_notice");
wire_gui_4 += browsewave.Port("gui_pseudo_pin_load_indication_notice");
wire_gui_4 += editwave.Port("gui_pseudo_pin_load_indication_notice");
wire_gui_4 += panel.Port("gui_pseudo_pin_load_indication_notice");
wire_gui_4 += serial.Port("gui_pseudo_pin_load_indication_notice");

wire_gui_5 = Wire(1);
wire_gui_5 += cpu.DebuggerPseudoPort("debugger_pseudo_pin_save_indication_notice");
wire_gui_5 += browsewave.Port("gui_pseudo_pin_save_indication_notice");
wire_gui_5 += editwave.Port("gui_pseudo_pin_save_indication_notice");
wire_gui_5 += panel.Port("gui_pseudo_pin_save_indication_notice");
wire_gui_5 += serial.Port("gui_pseudo_pin_save_indication_notice");

wire_gui_6 = Wire(1);
wire_gui_6 += cpu.DebuggerPseudoPort("debugger_pseudo_pin_main_clkout");
wire_gui_6 += browsewave.Port("gui_pseudo_pin_clock_notice");
wire_gui_6 += panel.Port("gui_pseudo_pin_clock_notice");
wire_gui_6 += editwave.Port("model_pseudo_pin_clock_notice");
wire_gui_6 += serial.Port("model_pseudo_pin_clock_notice");

wire_gui_load = Wire(1);wire_gui_load += cpu.DebuggerPseudoPort("debugger_pseudo_pin_load_indication_notice");wire_gui_load += editwave.Port("gui_pseudo_pin_load_indication_notice");wire_gui_load += browsewave.Port("gui_pseudo_pin_load_indication_notice");wire_gui_load += panel.Port("gui_pseudo_pin_load_indication_notice");wire_gui_load += serial.Port("gui_pseudo_pin_load_indication_notice");wire_gui_load += stdio.Port("gui_pseudo_pin_load_indication_notice");
wire_gui_save = Wire(1);wire_gui_save += cpu.DebuggerPseudoPort("debugger_pseudo_pin_save_indication_notice");wire_gui_save += editwave.Port("gui_pseudo_pin_save_indication_notice");wire_gui_save += browsewave.Port("gui_pseudo_pin_save_indication_notice");wire_gui_save += panel.Port("gui_pseudo_pin_save_indication_notice");wire_gui_save += serial.Port("gui_pseudo_pin_save_indication_notice");wire_gui_save += stdio.Port("gui_pseudo_pin_save_indication_notice");
#-------------------VSB----------------------- 
bus1 = BUS(8);
bus1 += cpu.BusMasterIF("VSB");

#------------------stdio----------------
bus1 += stdio.BusSlaveIF("PTIODAT");
bus1 += stdio.BusSlaveIF("PTIOCMD");
bus1 += stdio.BusSlaveIF("PTIOSTA");
bus1 += stdio.BusSlaveIF("PTIOPAR0");
bus1 += stdio.BusSlaveIF("PTIOPAR1");

#------------------ all port connection ----------------
cpu *= browsewave.Port("");
cpu *= editwave.Port("");
cpu *= panel.Port("");

⌨️ 快捷键说明

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