Updated examples

This commit is contained in:
Borna Rajković 2022-06-19 20:38:24 +02:00
parent d2fc849cc2
commit 350aa95da5
11 changed files with 110 additions and 252 deletions

View File

@ -1,7 +1,10 @@
@name "Jednostavni ARM" @name "Jednostavni ARM"
@info "Primjer ARM biblioteke" @info "Primjer ARM biblioteke"
@directory "." @directory "."
@header "set load_performs_init;" @header `
\\ Version 0.0.1
set load_performs_init;
`
@componentHeader " clock 100MHz;" @componentHeader " clock 100MHz;"
// adresni prostori // adresni prostori
@ -258,7 +261,7 @@
@displayName "LCD ekran" @displayName "LCD ekran"
@instanceName lcd @instanceName lcd
@count (0, 4) @count (0, 4)
@source "lcd8.signal" @source "lcd8.comdel"
@tooltip "LCD ekran" @tooltip "LCD ekran"
@display { @display {
@ -369,7 +372,7 @@
@component signal { @component signal {
@instanceName signal @instanceName signal
@count (1, 1) @count (0, 1)
@source "signal.comdel" @source "signal.comdel"
@tooltip "Signal" @tooltip "Signal"
@ -618,7 +621,7 @@
@displayName "Bridge" @displayName "Bridge"
@instanceName bridge @instanceName bridge
@tooltip "Bridge" @tooltip "Bridge"
@count (1, 1) @count (0, 1)
@source "bridge.comdel" @source "bridge.comdel"
@display { @display {
@ -702,18 +705,6 @@
} }
} }
} }
@pin dmacPin inOut {
@tooltip "Pin za spajanje na DMAC"
@display {
pin {
x: 100; y: 50; w: 10; h: 10;
type: "in";
orientation: "right";
}
}
@wires {null, null}
}
} }
/******************************************************************* /*******************************************************************
@ -746,7 +737,7 @@
@bus APB regular { @bus APB regular {
@instanceName apb @instanceName apb
@tooltip "Spora sabirnica" @tooltip "Spora sabirnica"
@count (1,1) @count (0, 1)
@display { @display {
bus { bus {
x: 0; y: 0; x: 0; y: 0;

View File

@ -1,5 +1,5 @@
@source "arm_library.csl" @source "arm_library.csl"
// /home/bbr/Documents/Personal/FER/schema_editor/examples/arm/
@schema { @schema {
@instance bridge Bridge { @instance bridge Bridge {
@position (-263, -97) @position (-263, -97)
@ -80,7 +80,7 @@
} }
@instance ui_unit UI_UNIT { @instance ui_unit UI_UNIT {
@position (-189, 25) @position (-200, 24)
@attribute type 0 @attribute type 0
@attribute name "Izlaz" @attribute name "Izlaz"
@attribute width 8 @attribute width 8

View File

@ -1,11 +1,14 @@
\\ Version 0.0.1
set load_performs_init; set load_performs_init;
#include ".\arm7tdmi.comdel" #include ".\arm7tdmi.comdel"
#include ".\bridge.comdel" #include ".\bridge.comdel"
#include ".\decoder.comdel" #include ".\decoder.comdel"
#include ".\dmac.comdel" #include ".\dmac.comdel"
#include ".\gpio.comdel" #include ".\gpio.comdel"
#include ".\interrupt_selector.comdel" #include ".\interrupt_selector.comdel"
#include ".\lcd8.signal" #include ".\lcd8.comdel"
#include ".\led.comdel" #include ".\led.comdel"
#include ".\memory.comdel" #include ".\memory.comdel"
#include ".\pushbutton.comdel" #include ".\pushbutton.comdel"

View File

@ -0,0 +1,67 @@
\\ Version 0.0.1
set load_performs_init;
#include ".\arm7tdmi.comdel"
#include ".\decoder.comdel"
#include ".\memory.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;
//gpio_port
wire --xp0;
wire --xp1;
wire --xp2;
wire --xp3;
wire --xp4;
wire --xp5;
wire --xp6;
wire --xp7;
// components --------------------------------------------
subcomponent Memory64KiB memorija(addr, rdata, wdata, size, write, ready, --sel_mem);
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);
display {
component { x: -473; y: -283; ref: "arm"; }
component { x: -433; y: 6; ref: "memorija"; }
component { x: -537; y: -202; ref: "decoder"; }
// ahb bus
rectangle {
x: -514; y: -86;
w: 249; h: 20;
}
// gpio_port bus
line {x1:-428; y1:6; x2:-389; y2:-75;}
line {x1:-418; y1:-152; x2:-389; y2:-75;}
line {x1:-517; y1:-172; x2:-389; y2:-75;}
}
}

28
examples/arm/minimum.csch Normal file
View File

@ -0,0 +1,28 @@
@source "arm_library.csl"
@schema {
@instance arm ARM7tdmi {
@position (-473, -283)
@attribute _memory memorija
}
@instance memorija Memory64KiB {
@position (-433, 6)
}
@instance decoder Decoder {
@position (-537, -202)
}
@instance ahb AHB {
@position (-514, -86)
@size 249
}
@connection (memorija.ahbPin, ahb) {
}
@connection (arm.ahbPin, ahb) {
}
@connection (decoder.ahbPin, ahb) {
}
}

View File

@ -1,64 +0,0 @@
@source "/home/bbr/Documents/Personal/FER/schema_editor/examples/arm/arm_library.csl"
@schema {
@instance bridge Bridge {
@position (-263, -97)
}
@instance arm ARM7tdmi {
@position (-473, -283)
@attribute _memory memorija
}
@instance memorija Memory64KiB {
@position (-433, 6)
}
@instance decoder Decoder {
@position (-541, -212)
}
@instance rtc RTC_IO {
@position (-63, -190)
}
@instance gpio GPIO {
@position (-217, 13)
@attribute title "GPIO 1"
}
@instance temperature Temperature {
@position (-47, -12)
}
@instance ahb AHB {
@position (-514, -86)
@size 249
}
@instance apb APB {
@position (-201, -87)
@size 329
}
@instance gpio_port gpio_port {
@position (0, 0)
@size -1
}
@connection (bridge.ahbPin, ahb) {
}
@connection (bridge.apbPin, apb) {
}
@connection (memorija.ahbPin, ahb) {
}
@connection (arm.ahbPin, ahb) {
}
@connection (decoder.ahbPin, ahb) {
}
@connection (rtc.apbPin, apb) {
}
@connection (gpio.apbPin, apb) {
@attribute gpioSelect sel_gpio_1
}
}

View File

@ -1,75 +0,0 @@
set load_performs_init;
#include "\arm7tdmi.comdel"
#include "\bridge.comdel"
#include "\decoder.comdel"
#include "\memory.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;
//apb
wire<32> apb__addr;
wire<32> apb__rdata;
wire<32> apb__wdata;
wire<3> --apb__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;
// 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, --apb__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, *, *) uses memorija;
subcomponent Decoder decoder(addr, nmreq, --sel_mem, sel_bridge, sel_dmac, 1, 1);
display {
component { x: -222; y: -97; ref: "bridge"; }
component { x: -473; y: -283; ref: "arm"; }
component { x: -433; y: 6; ref: "memorija"; }
component { x: -323; y: -217; ref: "decoder"; }
// ahb bus
rectangle {
x: -514; y: -86;
w: 249; h: 20;
}
// apb bus
rectangle {
x: -111; y: -81;
w: 329; h: 20;
}
line {x1:-222; y1:-77; x2:-389; y2:-75;}
line {x1:-162; y1:-77; x2:54; y2:-70;}
line {x1:-428; y1:6; x2:-389; y2:-75;}
line {x1:-418; y1:-152; x2:-389; y2:-75;}
line {x1:-303; y1:-187; x2:-389; y2:-75;}
}
}

View File

@ -1,14 +0,0 @@
@source "/home/bbr/Documents/Personal/FER/schema_editor/examples/simplified FRISC model/frisc_library.csl"
@schema {
@instance procesor FRISC {
@position (-177, -122)
@attribute _memory memorija2
}
@instance procesor FRISC {
@position (49, -97)
@attribute _memory null
}
}

View File

@ -1,29 +0,0 @@
@source "/home/bbr/Documents/Personal/FER/schema_editor/examples/simplified FRISC model/frisc_library.csl"
@schema {
@instance procesor FRISC {
@position (-464, -314)
@attribute _memory null
}
@instance dma DMA {
@position (-269, 46)
@attribute pocetnaAdresa 0
}
@instance glavnaSabirnica glavnaSabirnica {
@position (-579, -160)
@size 100
}
@instance PIOSabirnica PIOSabirnica {
@position (0, 0)
@size 0
}
@connection (dma.glavniPin, glavnaSabirnica) {
@attribute interupt INT2
}
@connection (dma.glavniPin, PIOSabirnica, procesor.glavniPin) {
}
}

View File

@ -1,49 +0,0 @@
@source "/home/bbr/Documents/Personal/FER/schema_editor/examples/simplified FRISC model/frisc_library.csl"
@schema {
@instance procesor FRISC {
@position (-104, -102)
@attribute _memory null
}
@instance memorija Memorija {
@position (39, 199)
@attribute sinkroniziran false
@attribute brzina 1
@attribute kapacitet 1024
@attribute size 8
@attribute pocetnaAdresa 0
}
@instance dma DMA {
@position (-352, 13)
@attribute pocetnaAdresa 1024
}
@instance glavnaSabirnica glavnaSabirnica {
@position (-106, 80)
@size 100
}
@instance PIOSabirnica PIOSabirnica {
@position (0, 0)
@size -1
}
@instance directRam directRam {
@position (0, 0)
@size -1
}
@connection (procesor.glavniPin, glavnaSabirnica) {
}
@connection (memorija.glavniPin, glavnaSabirnica) {
}
@connection (dma.glavniPin, glavnaSabirnica) {
@attribute interupt INT0
}
@connection (memorija.memDirect, directRam, procesor.memDirect) {
@attribute procConn "INT"
@attribute memConn "INT"
}
}

View File

@ -1,4 +1,4 @@
@source "/home/bbr/Documents/Personal/FER/schema_editor/examples/simplified FRISC model/frisc_library.csl" @source "frisc_library.csl"
@schema { @schema {
@instance procesor FRISC { @instance procesor FRISC {