\\ Version 0.0.1 set load_performs_init; #include ".\arm7tdmi.comdel" #include ".\bridge.comdel" #include ".\decoder.comdel" #include ".\dmac.comdel" #include ".\gpio.comdel" #include ".\interrupt_selector.comdel" #include ".\lcd8.comdel" #include ".\led.comdel" #include ".\memory.comdel" #include ".\pushbutton.comdel" #include ".\rtc.comdel" #include ".\signal.comdel" #include ".\temperature.comdel" #include ".\togglebutton.comdel" #include ".\ui_unit.comdel" component System { clock 100MHz; //ahb wire<32> addr; wire<32> rdata; wire<32> wdata; wire<3> size; wire write; wired_or ready; wired_or irq; wired_or fiq; wired_and nmreq; wire --sel_mem; wire sel_bridge; wire sel_dmac; wire busreq; wire grant; //apb wire<32> apb__addr; wire<32> apb__rdata; wire<32> apb__wdata; wire<3> --size; wire enable; wire apb__write; wire sel_gpio_1; wire sel_gpio_2; wire sel_ui_in; wire sel_rtc; wire sel_ui_out; wire --rtc_int; wire --dmac_int; wire --impulse; //gpio_port wire --xp0; wire --xp1; wire --xp2; wire --xp3; wire --xp4; wire --xp5; wire --xp6; wire --xp7; //gpio_port_000 wire --gpio_port_000__xp0; wire --gpio_port_000__xp1; wire --gpio_port_000__xp2; wire --gpio_port_000__xp3; wire --gpio_port_000__xp4; wire --gpio_port_000__xp5; wire --gpio_port_000__xp6; wire --gpio_port_000__xp7; //gpio_sa wire --xp; //gpio_sa_000 wire --gpio_sa_000__xp; //gpio_sa_001 wire --gpio_sa_001__xp; //gpio_sa_002 wire --gpio_sa_002__xp; //gpio_port_001 wire --gpio_port_001__xp0; wire --gpio_port_001__xp1; wire --gpio_port_001__xp2; wire --gpio_port_001__xp3; wire --gpio_port_001__xp4; wire --gpio_port_001__xp5; wire --gpio_port_001__xp6; wire --gpio_port_001__xp7; //gpio_sa_003 wire --gpio_sa_003__xp; //gpio_sa_004 wire --gpio_sa_004__xp; //arm_dmac wire --dmareq; wire --dmaack; //arm_dmac_000 wire --arm_dmac_000__dmareq; wire --arm_dmac_000__dmaack; // components -------------------------------------------- subcomponent Memory64KiB memorija(addr, rdata, wdata, size, write, ready, --sel_mem); subcomponent Bridge bridge(addr, rdata, wdata, size, write, ready, sel_bridge, apb__addr, apb__rdata, apb__wdata, --size, enable, apb__write, sel_gpio_1, sel_gpio_2, sel_rtc, sel_ui_in, sel_ui_out, 1, 1, 1, 1, 1); subcomponent ARM7tdmi arm(addr, rdata, wdata, size, write, ready, irq, fiq, nmreq, busreq, grant, *, *) uses memorija; subcomponent Decoder decoder(addr, nmreq, --sel_mem, sel_bridge, sel_dmac, 1, 1); subcomponent RTC_IO rtc(apb__addr, apb__rdata, apb__wdata, --size, enable, apb__write, sel_rtc, --rtc_int, --impulse); subcomponent GPIO gpio<"GPIO 1">(apb__addr, apb__rdata, apb__wdata, enable, apb__write, sel_gpio_1, --gpio_port_000__xp0, --gpio_port_000__xp1, --gpio_port_000__xp2, --gpio_port_000__xp3, --gpio_port_000__xp4, --gpio_port_000__xp5, --gpio_port_000__xp6, --gpio_port_000__xp7, --xp, *, *, *, --gpio_sa_000__xp, *, --gpio_sa_001__xp, *); subcomponent Temperature temperature(--gpio_port_000__xp0, --gpio_port_000__xp1, --gpio_port_000__xp2, --gpio_port_000__xp3, --gpio_port_000__xp4, --gpio_port_000__xp5, --gpio_port_000__xp6, --gpio_port_000__xp7); subcomponent LED led<"green">(--xp); subcomponent LED led_000<"yellow">(--gpio_sa_000__xp); subcomponent LED led_001<"red">(--gpio_sa_001__xp); subcomponent interrupt_selector interruptSelector(rtc_int, irq, fiq); subcomponent signal signal(--impulse); subcomponent interrupt_selector interruptSelector_000(dmac_int, irq, fiq); subcomponent lcd8 lcd(--gpio_port_001__xp0, --gpio_port_001__xp1, --gpio_port_001__xp2, --gpio_port_001__xp3, --gpio_port_001__xp4, --gpio_port_001__xp5, --gpio_port_001__xp6, --gpio_port_001__xp7); subcomponent GPIO gpio_000<"GPIO 2">(apb__addr, apb__rdata, apb__wdata, enable, apb__write, sel_gpio_2, --gpio_port_001__xp0, --gpio_port_001__xp1, --gpio_port_001__xp2, --gpio_port_001__xp3, --gpio_port_001__xp4, --gpio_port_001__xp5, --gpio_port_001__xp6, --gpio_port_001__xp7, --gpio_sa_003__xp, --gpio_sa_004__xp, *, *, *, *, *, *); subcomponent pushbutton push_button(--gpio_sa_003__xp); subcomponent togglebutton toggle_button(--gpio_sa_004__xp); subcomponent DMAC_simple dmac(addr, rdata, wdata, size, write, ready, sel_dmac, addr, rdata, wdata, size, write, ready, nmreq, busreq, grant, --dmac_int, 0, *, 0, *, --arm_dmac_000__dmareq, --arm_dmac_000__dmaack, --dmareq, --dmaack); subcomponent UI_UNIT ui_unit<0, "Izlaz", 8, 40>(apb__addr, apb__rdata, apb__wdata, --size, enable, apb__write, sel_ui_in, --arm_dmac_000__dmareq, --arm_dmac_000__dmaack); subcomponent UI_UNIT ui_unit_000<1, "Ulaz", 8, 40>(apb__addr, apb__rdata, apb__wdata, --size, enable, apb__write, sel_ui_out, --dmareq, --dmaack); display { component { x: -263; y: -97; ref: "bridge"; } component { x: -473; y: -283; ref: "arm"; } component { x: -545; y: 37; ref: "memorija"; } component { x: -541; y: -212; ref: "decoder"; } component { x: -63; y: -190; ref: "rtc"; } component { x: 32; y: 11; ref: "gpio"; } component { x: 144; y: -25; ref: "temperature"; } component { x: 159; y: 138; ref: "led"; } component { x: 182; y: 139; ref: "led_000"; } component { x: 202; y: 140; ref: "led_001"; } component { x: -235; y: -134; ref: "interruptSelector"; } component { x: 63; y: -44; ref: "signal"; } component { x: -238; y: -160; ref: "interruptSelector_000"; } component { x: 181; y: -199; ref: "lcd"; } component { x: 53; y: -222; ref: "gpio_000"; } component { x: 260; y: -98; ref: "push_button"; } component { x: 205; y: -70; ref: "toggle_button"; } component { x: -445; y: 12; ref: "dmac"; } component { x: -189; y: 25; ref: "ui_unit"; } component { x: -118; y: 63; ref: "ui_unit_000"; } // ahb bus rectangle { x: -514; y: -86; w: 249; h: 20; } // apb bus rectangle { x: -201; y: -87; w: 329; h: 20; } // gpio_port bus // gpio_port_000 bus // gpio_sa bus // gpio_sa_000 bus // gpio_sa_001 bus // gpio_sa_002 bus // gpio_port_001 bus // gpio_sa_003 bus // gpio_sa_004 bus // arm_dmac bus // arm_dmac_000 bus line {x1:-263; y1:-77; x2:-389; y2:-75;} line {x1:-203; y1:-77; x2:-36; y2:-76;} line {x1:-540; y1:37; x2:-389; y2:-75;} line {x1:-418; y1:-152; x2:-389; y2:-75;} line {x1:-521; y1:-182; x2:-389; y2:-75;} line {x1:-43; y1:-150; x2:-36; y2:-76;} line {x1:32; y1:56; x2:-36; y2:-76;} line {x1:112; y1:32; x2:164; y2:15;} line {x1:112; y1:91; x2:164; y2:138;} line {x1:112; y1:91; x2:187; y2:139;} line {x1:112; y1:91; x2:207; y2:140;} line {x1:-245; y1:-129; x2:-389; y2:-75;} line {x1:-215; y1:-129; x2:-36; y2:-76;} line {x1:68; y1:-44; x2:-36; y2:-76;} line {x1:-248; y1:-155; x2:-389; y2:-75;} line {x1:-218; y1:-155; x2:-36; y2:-76;} line {x1:53; y1:-177; x2:-36; y2:-76;} line {x1:133; y1:-201; x2:171; y2:-172;} line {x1:133; y1:-142; x2:277; y2:-108;} line {x1:133; y1:-142; x2:222; y2:-80;} line {x1:-340; y1:32; x2:-36; y2:-76;} line {x1:-370; y1:12; x2:-389; y2:-75;} line {x1:-410; y1:12; x2:-389; y2:-75;} line {x1:-118; y1:93; x2:-325; y2:92;} line {x1:-189; y1:55; x2:-325; y2:77;} line {x1:-159; y1:25; x2:-36; y2:-76;} line {x1:-88; y1:63; x2:-36; y2:-76;} } }