├── icestick ├── RS232 │ └── RX │ │ ├── Install_pyserial_for_python.txt │ │ ├── Serial_v1.bas │ │ ├── Readme.txt │ │ ├── Serial_RX_115200_example.py │ │ └── example.json ├── Contador_7segmentos │ ├── Frequency_meter │ │ ├── Readme.txt │ │ ├── Docs │ │ │ └── Frequency_meter_scr.PNG │ │ └── example.json │ ├── Docs │ │ └── conexion transistores anodo comun.PNG │ └── example.json ├── Otros │ ├── imagenes SVG │ │ ├── ALU.png │ │ ├── Gnd.jpg │ │ ├── Vcc.png │ │ ├── clock.gif │ │ ├── Buffer.png │ │ ├── IEC_GND.png │ │ ├── Mux4a1.png │ │ ├── TriState.gif │ │ ├── image035.gif │ │ ├── Puerta_AND.png │ │ ├── 1-to-8-Demux.jpg │ │ ├── Shift Regsiter.png │ │ ├── BiestableD4bits.svg │ │ ├── TriState.svg │ │ ├── Buffer.svg │ │ └── clock.svg │ ├── tutorial Obijuan using IceStudio │ │ ├── Ejem02 │ │ │ ├── Ejem02.gtkw │ │ │ ├── ejem02.pcf │ │ │ ├── ejem02.v │ │ │ ├── Ejem2_tb.v │ │ │ └── Ejem02.ice │ │ ├── Readme.txt │ │ ├── Ejem04 Preescaler │ │ │ ├── PreescalerA.ice │ │ │ ├── Ejem04 Preescaler.ice │ │ │ ├── Preescaler.ice │ │ │ └── Ejem04 Preescaler1.ice │ │ ├── Ejem03A │ │ │ └── Ejem03.ice │ │ └── Ejem03 │ │ │ └── Ejem03.ice │ ├── Readme.txt │ ├── InDefinidos │ │ └── 01.ice │ ├── Ejemplos │ │ ├── Ex TrueTable.ice │ │ ├── 1_led_on.ice │ │ └── PullUp.ice │ └── Modulos │ │ ├── counter_8.ice │ │ ├── PseudoRandomNumber4.ice │ │ ├── PseudoRandomNumber8.ice │ │ ├── counter_16.ice │ │ ├── PseudoRandomInitialNumber4.ice │ │ ├── PseudoRandomInitialNumber8.ice │ │ ├── TriState01.ice │ │ ├── TriStatePrimitive.ice │ │ ├── PseudoRandomNumber16.ice │ │ └── buffer.ice ├── PWM │ └── example.json ├── Contador_tipo_UD_clock │ └── example.json ├── Breath_LED │ └── example.json └── KITT │ └── example.json ├── kefir_i └── CapSense │ ├── capsense.v │ └── capsense_sys.v ├── icezum ├── Contador-7seg │ ├── doc │ │ ├── 7seg-box-1.jpg │ │ ├── icezum-7seg-1.jpg │ │ ├── icezum-7seg-2.jpg │ │ └── icezum-7seg-icestudio-screenshot-1.jpg │ ├── example.json │ ├── README.md │ ├── Delay-1s.iceb │ └── Delay-1s-master.ice ├── Counter-hand │ ├── doc │ │ └── CounterHand-Icestudio.png │ ├── example.json │ ├── README.md │ └── src │ │ ├── ServoMotor.v │ │ ├── Div.iceb │ │ ├── Div.ice │ │ ├── ServoBit.iceb │ │ ├── ServoBit.ice │ │ ├── Counter.iceb │ │ └── Counter.ice ├── counter-4bit │ ├── example.json │ └── div.v ├── Contador-HOYGANMUNDO │ └── example.json └── Antirrebotes │ ├── Flip-flop-T.iceb │ ├── Flip-flop-T-master.ice │ ├── antirrebotes.iceb │ ├── antirrebotes.ice │ └── antirrebotes_master.ice ├── template └── example.json ├── README.md └── alhambraII ├── svg ├── JK_flip-flop_NAND.svg ├── Logic-gate-and-us.svg ├── Nand-gate-en.svg ├── Nor-gate-en.svg └── 3-Input_AND_ANSI.svg └── myblocks ├── myAND.ice ├── myAND3.ice ├── myNAND.ice └── myNOR.ice /icestick/RS232/RX/Install_pyserial_for_python.txt: -------------------------------------------------------------------------------- 1 | pip install pyserial -------------------------------------------------------------------------------- /icestick/Contador_7segmentos/Frequency_meter/Readme.txt: -------------------------------------------------------------------------------- 1 | Frequency_meter_v2 is better than Frequency_meter_v1 -------------------------------------------------------------------------------- /kefir_i/CapSense/capsense.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/kefir_i/CapSense/capsense.v -------------------------------------------------------------------------------- /icestick/RS232/RX/Serial_v1.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/RS232/RX/Serial_v1.bas -------------------------------------------------------------------------------- /kefir_i/CapSense/capsense_sys.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/kefir_i/CapSense/capsense_sys.v -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/ALU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/ALU.png -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Gnd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/Gnd.jpg -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Vcc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/Vcc.png -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/clock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/clock.gif -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Buffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/Buffer.png -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/IEC_GND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/IEC_GND.png -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Mux4a1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/Mux4a1.png -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/TriState.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/TriState.gif -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/image035.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/image035.gif -------------------------------------------------------------------------------- /icezum/Contador-7seg/doc/7seg-box-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icezum/Contador-7seg/doc/7seg-box-1.jpg -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Puerta_AND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/Puerta_AND.png -------------------------------------------------------------------------------- /icezum/Contador-7seg/doc/icezum-7seg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icezum/Contador-7seg/doc/icezum-7seg-1.jpg -------------------------------------------------------------------------------- /icezum/Contador-7seg/doc/icezum-7seg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icezum/Contador-7seg/doc/icezum-7seg-2.jpg -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/1-to-8-Demux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/1-to-8-Demux.jpg -------------------------------------------------------------------------------- /icestick/RS232/RX/Readme.txt: -------------------------------------------------------------------------------- 1 | More information, as a logbook: 2 | https://groups.google.com/forum/#!topic/fpga-wars-explorando-el-lado-libre/ky4TLQb1wWw -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Shift Regsiter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Otros/imagenes SVG/Shift Regsiter.png -------------------------------------------------------------------------------- /icezum/Counter-hand/doc/CounterHand-Icestudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icezum/Counter-hand/doc/CounterHand-Icestudio.png -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem02/Ejem02.gtkw: -------------------------------------------------------------------------------- 1 | [*] Code generated by Icestudio 0.3.0-rc-dev 2 | [*] Wed, 08 Mar 2017 23:52:25 GMT 3 | 4 | main_tb.out[3:0] 5 | -------------------------------------------------------------------------------- /icezum/Contador-7seg/doc/icezum-7seg-icestudio-screenshot-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icezum/Contador-7seg/doc/icezum-7seg-icestudio-screenshot-1.jpg -------------------------------------------------------------------------------- /icestick/Contador_7segmentos/Docs/conexion transistores anodo comun.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Contador_7segmentos/Docs/conexion transistores anodo comun.PNG -------------------------------------------------------------------------------- /icestick/Contador_7segmentos/Frequency_meter/Docs/Frequency_meter_scr.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FPGAwars/icestudio-examples/HEAD/icestick/Contador_7segmentos/Frequency_meter/Docs/Frequency_meter_scr.PNG -------------------------------------------------------------------------------- /template/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "version": "1.0.0", 4 | "author": "", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/RS232/RX/Serial_RX_115200_example.py: -------------------------------------------------------------------------------- 1 | import time 2 | import serial 3 | 4 | port = serial.Serial('COM5', 115200) 5 | 6 | for i in range(255): 7 | print(i) 8 | port.write(chr(i)) 9 | time.sleep(0.2) 10 | 11 | port.close() 12 | -------------------------------------------------------------------------------- /icestick/Otros/Readme.txt: -------------------------------------------------------------------------------- 1 | 2 | I am trying to learn verilog using a real and amazing tool call IceStudio: 3 | 4 | 5 | https://github.com/FPGAwars/icestudio 6 | 7 | I am using a board call IceStick, it is a very cheap board. It's a good option for starting 8 | 9 | -------------------------------------------------------------------------------- /icestick/PWM/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PWM", 3 | "version": "1.0.0", 4 | "author": "Democrito", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "Dos ejemplos de PWM, rampa y senoidal", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem02/ejem02.pcf: -------------------------------------------------------------------------------- 1 | # Code generated by Icestudio 0.3.0-rc-dev 2 | # Wed, 08 Mar 2017 23:50:27 GMT 3 | 4 | set_io vba3212[3] 99 5 | set_io vba3212[2] 98 6 | set_io vba3212[1] 97 7 | set_io vba3212[0] 96 8 | set_io vinit 95 9 | -------------------------------------------------------------------------------- /icezum/Counter-hand/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "counter-hand", 3 | "version": "1.0.0", 4 | "author": "Jesús Arroyo", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "4 bit counter using a robotic hand", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icezum/counter-4bit/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "counter-4bit", 3 | "version": "1.0.0", 4 | "author": "Jesús Arroyo", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "Counter 4 bit with enable and reset", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Readme.txt: -------------------------------------------------------------------------------- 1 | 2 | I am trying to translate this examples: 3 | 4 | 5 | https://github.com/Obijuan/open-fpga-verilog-tutorial/wiki 6 | 7 | using development tool (free FPGAs ) call IceStudio 8 | 9 | https://github.com/FPGAwars/icestudio -------------------------------------------------------------------------------- /icestick/Contador_7segmentos/Frequency_meter/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Frequency meters", 3 | "version": "1.0.0", 4 | "author": "Democrito", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "Frequency meter 0..9999Hz", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/Contador_tipo_UD_clock/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Contador tipo UD clock", 3 | "version": "1.0.0", 4 | "author": "Democrito", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "Contador reversible de 5 bits", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/RS232/RX/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RS232_RX", 3 | "version": "1.0.0", 4 | "author": "Democrito", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "Examples of FPGA receivers with multiples baudrates for RS232.", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/Breath_LED/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Breathing LED", 3 | "version": "1.0.0", 4 | "author": "Carlos Diaz", 5 | "license": "GPL-2.0", 6 | "keywords": "LED, PWM, Contadores, Comparadores", 7 | "description": "The LED5 on the iceStick board fade in and out.", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icezum/Contador-HOYGANMUNDO/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Contador-HOYGANMUNDO", 3 | "version": "1.0.0", 4 | "author": "JorFru", 5 | "license": "GPL-2.0", 6 | "keywords": "Contador-biestables-", 7 | "description": "un contador hecho con componentes discretos (biestables)", 8 | "icestudio": ">=0.2.4-dev" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/KITT/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KITT", 3 | "version": "1.0.0", 4 | "author": "Democrito", 5 | "license": "GPL-2.0", 6 | "keywords": "", 7 | "description": "Se trata de 8 leds y uno de ellos hace el movimiento de vaivén, como en la serie de TV \"El coche fantástico\"", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icestick/Contador_7segmentos/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Display 7 segmentos (Cátodo común)", 3 | "version": "1.0.0", 4 | "author": "Carlos Diaz", 5 | "license": "GPL-2.0", 6 | "keywords": "display, contador", 7 | "description": "Contador ascendente que muestra la cuenta en un display de 7 segmentos", 8 | "icestudio": ">=0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icezum/Counter-hand/README.md: -------------------------------------------------------------------------------- 1 | # Counter hand 2 | 3 | 4 bit counter using a robotic hand 4 | 5 | ![](doc/CounterHand-Icestudio.png) 6 | 7 | ## Video 8 | 9 | [![FPGA Counter using a Robotic hand](http://img.youtube.com/vi/cAfvn70xK-Q/0.jpg)](https://www.youtube.com/watch?v=cAfvn70xK-Q "FPGA Counter using a Robotic hand") 10 | 11 | ### FPGA resources 12 | 13 | * PIOs 8 / 96 14 | * PLBs 60 / 160 15 | * BRAMs 0 / 16 16 | -------------------------------------------------------------------------------- /icezum/Contador-7seg/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Contador-7seg", 3 | "version": "1.0.0", 4 | "author": ["Carlos Diaz", "Juan Gonzalez"], 5 | "license": "GPL-2.0", 6 | "keywords": ["display", "contador"], 7 | "description": "Contador hexadecimal ascendente (de 4 bits) que muestra la cuenta en un display de 7 segmentos, cada segundo: 0-1-2-3-4-5-6-7-8-9-A-b-C-d-E-F, y también en binario en los leds de la Icezum", 8 | "icestudio": ">0.2.1" 9 | } 10 | -------------------------------------------------------------------------------- /icezum/counter-4bit/div.v: -------------------------------------------------------------------------------- 1 | module DIV (input clk, output out); 2 | 3 | parameter N = 22; 4 | localparam M = $pow(2, N); // 2**N 5 | 6 | wire clk_temp; 7 | reg [N - 1:0] c = 0; 8 | reg dout; 9 | 10 | assign out = dout; 11 | 12 | always @(posedge clk) 13 | if (M == 0) 14 | c <= 0; 15 | else if (c == M - 1) 16 | c <= 0; 17 | else 18 | c <= c + 1; 19 | 20 | assign clk_temp = (c == 0) ? 1 : 0; 21 | 22 | always @(posedge clk) 23 | if (N == 0) 24 | out <= 0; 25 | else if (clk_temp == 1) 26 | 27 | dout <= ~dout; 28 | 29 | endmodule 30 | -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem02/ejem02.v: -------------------------------------------------------------------------------- 1 | // Code generated by Icestudio 0.3.0-rc-dev 2 | // Wed, 08 Mar 2017 23:48:52 GMT 3 | 4 | `default_nettype none 5 | 6 | module main ( 7 | output [3:0] vba3212, 8 | output [0:0] vinit 9 | ); 10 | wire [0:3] w0; 11 | assign vba3212 = w0; 12 | main_v5ef7b7 v5ef7b7 ( 13 | .data(w0) 14 | ); 15 | assign vinit = 1'b0; 16 | endmodule 17 | 18 | module main_v5ef7b7 ( 19 | output [3:0] data 20 | ); 21 | 22 | //-- La salida del modulo son 4 cables 23 | wire [3:0] data; 24 | 25 | //-- Sacar el valor por el bus de salida 26 | assign data = 4'b0110; //-- 4'hA 27 | 28 | endmodule 29 | -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem02/Ejem2_tb.v: -------------------------------------------------------------------------------- 1 | // Code generated by Icestudio 0.3.0-rc-dev 2 | // Wed, 08 Mar 2017 23:51:23 GMT 3 | 4 | // Testbench template 5 | 6 | `default_nettype none 7 | `define DUMPSTR(x) `"x.vcd`" 8 | `timescale 10 ns / 1 ns 9 | 10 | 11 | module main_tb; 12 | 13 | // Simulation time: 100ns (10 * 10ns) 14 | parameter DURATION = 10; 15 | 16 | // Input/Output 17 | wire [3:0] out; 18 | 19 | // Module instance 20 | main MAIN ( 21 | .vba3212(out) 22 | ); 23 | 24 | initial begin 25 | // File were to store the simulation results 26 | $dumpfile(`DUMPSTR(`VCD_OUTPUT)); 27 | $dumpvars(0, main_tb); 28 | 29 | // TODO: initialize the registers here 30 | // e.g. value = 1; 31 | // e.g. #2 value = 0; 32 | 33 | #(DURATION) $display("End of simulation"); 34 | $finish; 35 | end 36 | 37 | endmodule 38 | -------------------------------------------------------------------------------- /icezum/Contador-7seg/README.md: -------------------------------------------------------------------------------- 1 | ![](doc/icezum-7seg-1.jpg) 2 | 3 | # Contador ascendente hexadecimal 4 | 5 | ## Descripción 6 | 7 | Contador ascendente hexadecimal (de 4 bits) que muestra la cuenta en un **display de 7 segmentos** cada segundo: 0-1-2-3-4-5-6-7-8-9-A-b-C-d-E-F, y también en binario en los leds de la Icezum 8 | 9 | Es necesario conectar una **placa externa** con el display de 7 segmentos 10 | 11 | ## Vídeo 12 | 13 | [Enlace al Vídeo en youtube](https://www.youtube.com/watch?v=iKdgIqJyfaw) 14 | 15 | ## Fotos 16 | 17 | ![](doc/icezum-7seg-icestudio-screenshot-1.jpg) 18 | 19 | ![](doc/icezum-7seg-2.jpg) 20 | 21 | ## Carcasa imprimible en 3D 22 | 23 | Para proteger la placa de los 7 segmentos, se puede usar [esta carcasa imprimible en 3D](https://github.com/Obijuan/3D-parts/wiki/Carcasa-para-placa-con-display-7-segmentos) 24 | 25 | ![](https://github.com/FPGAwars/icestudio-examples/raw/master/Icezum-alhambra/Contador-7seg/doc/7seg-box-1.jpg) 26 | 27 | -------------------------------------------------------------------------------- /icezum/Counter-hand/src/ServoMotor.v: -------------------------------------------------------------------------------- 1 | `default_nettype none 2 | 3 | //-- Servo module 4 | module ServoMotor(input wire clk, //-- System clock 5 | input wire [7:0] pos, //-- Servo pos 0 - 255 6 | output reg servo); //-- Servo control signal 7 | 8 | localparam M = 93; //-- 94 9 | localparam N = $clog2(M); 10 | 11 | reg [N-1:0] divcounter = 0; 12 | reg tic = 0; 13 | 14 | //-- Ticks generation. A pulse is emmited every M system clock cycles 15 | always @(posedge clk) 16 | tic <= (divcounter == M - 2); 17 | 18 | //-- Module M counter 19 | always @(posedge clk) 20 | if (tic) 21 | divcounter <= 0; 22 | else 23 | divcounter <= divcounter + 1; 24 | 25 | //-- Angle counter 26 | reg [10:0] angle_counter = 0; 27 | 28 | wire [8:0] pose = {1'b0, pos} + 9'd46; 29 | 30 | always @(posedge clk) 31 | if (tic) 32 | angle_counter <= angle_counter + 1; 33 | 34 | always @(posedge clk) 35 | servo <= (angle_counter < {3'b00, pose}); 36 | 37 | endmodule 38 | -------------------------------------------------------------------------------- /icestick/Otros/InDefinidos/01.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "ce3ce464-80ae-4416-a4bf-4edf12965524", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "//module(clk,in_data,out_data);\n\nparameter BITS=8;\nparameter STAGES=4;\n\ninput clk;\ninput [BITS-1:0] in_data;\noutput [BITS-1:0] out_data;\nreg [BITS-1:0] ffs [STAGES-1:0];\n\ninteger i;\nalways @(posedge clk)\nbegin\n ffs[0] <= in_data;\n for (i=1; i Note: this must be done only once. Upstream is the alias of the remote main repository. 19 | 20 | ### Create the example 21 | 22 | 1. **Create your example's dir**: `mkdir myexample` 23 | 2. **Add your example's files**: \*.ice, \*.iceb, \*.v, \*.list, etc 24 | 3. **Add the example.json file**: use template/example.json as reference 25 | 26 | ### Upload the example 27 | 28 | 1. **Add your example to git**: `git add myexample` 29 | 2. **Commit the changes**: `git commit -m 'Add myexample'` 30 | 3. **Push the example into GitHub**: `git push origin master` 31 | 32 | > Note: origin is the alias of your remote forked repository. Master is the name of the main branch. 33 | 34 | ### Create a pull request 35 | 36 | 1. **Go to your fork website**: https://github.com/smith/icestudio-examples 37 | 2. **Start a pull request**: press 'New pull request' 38 | 3. **Create a pull request**: press 'Create a pull request' and wait until it is merged or commented 39 | 40 | > Note: any new commit pushed into your GitHub repository before it is merged, will be added to the current pull request. 41 | 42 | ### Sync your fork 43 | 44 | 1. **Check your repository**: make sure that you don't have not staged files 45 | 2. **Download the upstream changes**: `git pull upstream master` 46 | 3. **Upload the changes to origin**: `git push origin master` 47 | -------------------------------------------------------------------------------- /icezum/Antirrebotes/Flip-flop-T.iceb: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 7.9999993072785065, 6 | "y": -20.000000652382138 7 | }, 8 | "zoom": 1.0000000326191067 9 | }, 10 | "graph": { 11 | "blocks": [ 12 | { 13 | "id": "9f0770e4-a271-4b13-b039-e8ff0c55bc1c", 14 | "type": "basic.input", 15 | "data": { 16 | "label": "T" 17 | }, 18 | "position": { 19 | "x": 88, 20 | "y": 144 21 | } 22 | }, 23 | { 24 | "id": "95e231e1-a0cb-4e2b-8db1-a60b960ed687", 25 | "type": "basic.code", 26 | "data": { 27 | "code": "//-- Biestable T simple\n//-- Cambia de estado con el flanco\n//-- en T\n\n//-- Estado interno\n//-- Inicialmente 1\nreg _T = 1;\n\n//-- Cambio de estado con cada flanco\nalways @(posedge T) begin\n _T <= ~_T;\nend\n\n//-- Sacar el estado al exterior\nassign Q = _T;\n", 28 | "ports": { 29 | "in": [ 30 | "T" 31 | ], 32 | "out": [ 33 | "Q" 34 | ] 35 | } 36 | }, 37 | "position": { 38 | "x": 280, 39 | "y": 48 40 | } 41 | }, 42 | { 43 | "id": "b7ca919a-7fff-4664-9865-be3349c66f89", 44 | "type": "basic.output", 45 | "data": { 46 | "label": "Q" 47 | }, 48 | "position": { 49 | "x": 792, 50 | "y": 144 51 | } 52 | } 53 | ], 54 | "wires": [ 55 | { 56 | "source": { 57 | "block": "95e231e1-a0cb-4e2b-8db1-a60b960ed687", 58 | "port": "Q" 59 | }, 60 | "target": { 61 | "block": "b7ca919a-7fff-4664-9865-be3349c66f89", 62 | "port": "in" 63 | } 64 | }, 65 | { 66 | "source": { 67 | "block": "9f0770e4-a271-4b13-b039-e8ff0c55bc1c", 68 | "port": "out" 69 | }, 70 | "target": { 71 | "block": "95e231e1-a0cb-4e2b-8db1-a60b960ed687", 72 | "port": "T" 73 | } 74 | } 75 | ] 76 | }, 77 | "deps": {} 78 | } -------------------------------------------------------------------------------- /icezum/Contador-7seg/Delay-1s.iceb: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": -0.000018294353623105053, 6 | "y": 0.14129806496099206 7 | }, 8 | "zoom": 0.9999999940739842 9 | }, 10 | "graph": { 11 | "blocks": [ 12 | { 13 | "id": "1a8fbc1d-c7b7-4a1e-9ab3-00a7e5f0dd00", 14 | "type": "basic.input", 15 | "data": { 16 | "label": "clk" 17 | }, 18 | "position": { 19 | "x": 144, 20 | "y": 264 21 | } 22 | }, 23 | { 24 | "id": "f8e7d270-f8ea-4ab9-920c-d6682902d8d9", 25 | "type": "basic.output", 26 | "data": { 27 | "label": "clk_out" 28 | }, 29 | "position": { 30 | "x": 856, 31 | "y": 264 32 | } 33 | }, 34 | { 35 | "id": "ae42f8e9-9644-48a6-9d33-c90d2296edff", 36 | "type": "basic.code", 37 | "data": { 38 | "code": "parameter M = 12_000_000;\nlocalparam N = $clog2(M);\n\nreg [N-1:0] divcounter = 0;\n\nalways @(posedge clk_in)\n if (divcounter == M - 1)\n divcounter <= 0;\n else\n divcounter <= divcounter + 1;\n\nassign clk_out = divcounter[N - 1];", 39 | "ports": { 40 | "in": [ 41 | "clk_in" 42 | ], 43 | "out": [ 44 | "clk_out" 45 | ] 46 | } 47 | }, 48 | "position": { 49 | "x": 352, 50 | "y": 168 51 | } 52 | } 53 | ], 54 | "wires": [ 55 | { 56 | "source": { 57 | "block": "1a8fbc1d-c7b7-4a1e-9ab3-00a7e5f0dd00", 58 | "port": "out" 59 | }, 60 | "target": { 61 | "block": "ae42f8e9-9644-48a6-9d33-c90d2296edff", 62 | "port": "clk_in" 63 | } 64 | }, 65 | { 66 | "source": { 67 | "block": "ae42f8e9-9644-48a6-9d33-c90d2296edff", 68 | "port": "clk_out" 69 | }, 70 | "target": { 71 | "block": "f8e7d270-f8ea-4ab9-920c-d6682902d8d9", 72 | "port": "in" 73 | } 74 | } 75 | ] 76 | }, 77 | "deps": {} 78 | } -------------------------------------------------------------------------------- /icezum/Counter-hand/src/Div.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 0.9999999924529988 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "5e63bca8-458e-4d7a-ae46-dc2e457fdbf7", 15 | "type": "basic.input", 16 | "data": { 17 | "label": "12MHz", 18 | "pin": { 19 | "name": "CLK", 20 | "value": "21" 21 | } 22 | }, 23 | "position": { 24 | "x": 64, 25 | "y": 152 26 | } 27 | }, 28 | { 29 | "id": "400c2d1d-bce3-4d7a-8ab9-078bd072e1b7", 30 | "type": "basic.output", 31 | "data": { 32 | "label": "1Hz", 33 | "pin": { 34 | "name": "LED0", 35 | "value": "95" 36 | } 37 | }, 38 | "position": { 39 | "x": 752, 40 | "y": 152 41 | } 42 | }, 43 | { 44 | "id": "b167fc5b-d193-4061-946a-985d3f2ec809", 45 | "type": "basic.code", 46 | "data": { 47 | "code": "// Div 12MHz to 1Hz\n\nparameter M = 12_000_000;\nlocalparam N = $clog2(M);\n\nreg [N-1:0] c = 0;\n\nalways @(posedge clk_in)\n c <= (c == M - 1) ? 0 : c + 1;\n\nassign clk_out = c[N-1];", 48 | "ports": { 49 | "in": [ 50 | "clk_in" 51 | ], 52 | "out": [ 53 | "clk_out" 54 | ] 55 | } 56 | }, 57 | "position": { 58 | "x": 248, 59 | "y": 56 60 | } 61 | } 62 | ], 63 | "wires": [ 64 | { 65 | "source": { 66 | "block": "5e63bca8-458e-4d7a-ae46-dc2e457fdbf7", 67 | "port": "out" 68 | }, 69 | "target": { 70 | "block": "b167fc5b-d193-4061-946a-985d3f2ec809", 71 | "port": "clk_in" 72 | } 73 | }, 74 | { 75 | "source": { 76 | "block": "b167fc5b-d193-4061-946a-985d3f2ec809", 77 | "port": "clk_out" 78 | }, 79 | "target": { 80 | "block": "400c2d1d-bce3-4d7a-8ab9-078bd072e1b7", 81 | "port": "in" 82 | } 83 | } 84 | ] 85 | }, 86 | "deps": {} 87 | } -------------------------------------------------------------------------------- /icezum/Antirrebotes/Flip-flop-T-master.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 7.9999993072785065, 6 | "y": -20.000000652382138 7 | }, 8 | "zoom": 1.0000000326191067 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "9f0770e4-a271-4b13-b039-e8ff0c55bc1c", 15 | "type": "basic.input", 16 | "data": { 17 | "label": "T", 18 | "pin": { 19 | "name": "CLK", 20 | "value": "21" 21 | } 22 | }, 23 | "position": { 24 | "x": 88, 25 | "y": 144 26 | } 27 | }, 28 | { 29 | "id": "95e231e1-a0cb-4e2b-8db1-a60b960ed687", 30 | "type": "basic.code", 31 | "data": { 32 | "code": "//-- Biestable T simple\n//-- Cambia de estado con el flanco\n//-- en T\n\n//-- Estado interno\n//-- Inicialmente 1\nreg _T = 1;\n\n//-- Cambio de estado con cada flanco\nalways @(posedge T) begin\n _T <= ~_T;\nend\n\n//-- Sacar el estado al exterior\nassign Q = _T;\n", 33 | "ports": { 34 | "in": [ 35 | "T" 36 | ], 37 | "out": [ 38 | "Q" 39 | ] 40 | } 41 | }, 42 | "position": { 43 | "x": 280, 44 | "y": 48 45 | } 46 | }, 47 | { 48 | "id": "b7ca919a-7fff-4664-9865-be3349c66f89", 49 | "type": "basic.output", 50 | "data": { 51 | "label": "Q", 52 | "pin": { 53 | "name": "LED0", 54 | "value": "95" 55 | } 56 | }, 57 | "position": { 58 | "x": 792, 59 | "y": 144 60 | } 61 | } 62 | ], 63 | "wires": [ 64 | { 65 | "source": { 66 | "block": "95e231e1-a0cb-4e2b-8db1-a60b960ed687", 67 | "port": "Q" 68 | }, 69 | "target": { 70 | "block": "b7ca919a-7fff-4664-9865-be3349c66f89", 71 | "port": "in" 72 | } 73 | }, 74 | { 75 | "source": { 76 | "block": "9f0770e4-a271-4b13-b039-e8ff0c55bc1c", 77 | "port": "out" 78 | }, 79 | "target": { 80 | "block": "95e231e1-a0cb-4e2b-8db1-a60b960ed687", 81 | "port": "T" 82 | } 83 | } 84 | ] 85 | }, 86 | "deps": {} 87 | } -------------------------------------------------------------------------------- /icezum/Contador-7seg/Delay-1s-master.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": -0.000018294353623105053, 6 | "y": 0.14129806496099206 7 | }, 8 | "zoom": 0.9999999940739842 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "1a8fbc1d-c7b7-4a1e-9ab3-00a7e5f0dd00", 15 | "type": "basic.input", 16 | "data": { 17 | "label": "clk", 18 | "pin": { 19 | "name": "CLK", 20 | "value": "21" 21 | } 22 | }, 23 | "position": { 24 | "x": 144, 25 | "y": 264 26 | } 27 | }, 28 | { 29 | "id": "f8e7d270-f8ea-4ab9-920c-d6682902d8d9", 30 | "type": "basic.output", 31 | "data": { 32 | "label": "clk_out", 33 | "pin": { 34 | "name": "LED0", 35 | "value": "95" 36 | } 37 | }, 38 | "position": { 39 | "x": 856, 40 | "y": 264 41 | } 42 | }, 43 | { 44 | "id": "ae42f8e9-9644-48a6-9d33-c90d2296edff", 45 | "type": "basic.code", 46 | "data": { 47 | "code": "parameter M = 12_000_000;\nlocalparam N = $clog2(M);\n\nreg [N-1:0] divcounter = 0;\n\nalways @(posedge clk_in)\n if (divcounter == M - 1)\n divcounter <= 0;\n else\n divcounter <= divcounter + 1;\n\nassign clk_out = divcounter[N - 1];", 48 | "ports": { 49 | "in": [ 50 | "clk_in" 51 | ], 52 | "out": [ 53 | "clk_out" 54 | ] 55 | } 56 | }, 57 | "position": { 58 | "x": 352, 59 | "y": 168 60 | } 61 | } 62 | ], 63 | "wires": [ 64 | { 65 | "source": { 66 | "block": "1a8fbc1d-c7b7-4a1e-9ab3-00a7e5f0dd00", 67 | "port": "out" 68 | }, 69 | "target": { 70 | "block": "ae42f8e9-9644-48a6-9d33-c90d2296edff", 71 | "port": "clk_in" 72 | } 73 | }, 74 | { 75 | "source": { 76 | "block": "ae42f8e9-9644-48a6-9d33-c90d2296edff", 77 | "port": "clk_out" 78 | }, 79 | "target": { 80 | "block": "f8e7d270-f8ea-4ab9-920c-d6682902d8d9", 81 | "port": "in" 82 | } 83 | } 84 | ] 85 | }, 86 | "deps": {} 87 | } -------------------------------------------------------------------------------- /alhambraII/svg/JK_flip-flop_NAND.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JK flip-flop NAND 5 | A JK flip-flop made of NAND gates, drawn by CMG Lee. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | clock 39 | J 40 | K 41 | Q 42 | Q_ 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem02/Ejem02.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "5e4d57ab-45da-4b14-a85a-0c83f04b1770", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "\r\n //-- La salida del modulo son 4 cables\r\n wire [3:0] data;\r\n\r\n //-- Sacar el valor por el bus de salida\r\n assign data = 4'b0110; //-- 4'hA\r\n\r\n", 19 | "params": [], 20 | "ports": { 21 | "in": [], 22 | "out": [ 23 | { 24 | "name": "data", 25 | "range": "[3:0]", 26 | "size": 4 27 | } 28 | ] 29 | } 30 | }, 31 | "position": { 32 | "x": 456, 33 | "y": 192 34 | }, 35 | "size": { 36 | "width": 528, 37 | "height": 288 38 | } 39 | }, 40 | { 41 | "id": "b0c7ab16-7d98-47e3-a0fc-6e7ccc725c9d", 42 | "type": "basic.output", 43 | "data": { 44 | "name": "out", 45 | "range": "[3:0]", 46 | "pins": [ 47 | { 48 | "index": "3", 49 | "name": "D1", 50 | "value": "99" 51 | }, 52 | { 53 | "index": "2", 54 | "name": "D2", 55 | "value": "98" 56 | }, 57 | { 58 | "index": "1", 59 | "name": "D3", 60 | "value": "97" 61 | }, 62 | { 63 | "index": "0", 64 | "name": "D4", 65 | "value": "96" 66 | } 67 | ], 68 | "virtual": false 69 | }, 70 | "position": { 71 | "x": 1184, 72 | "y": 256 73 | } 74 | } 75 | ], 76 | "wires": [ 77 | { 78 | "source": { 79 | "block": "5e4d57ab-45da-4b14-a85a-0c83f04b1770", 80 | "port": "data" 81 | }, 82 | "target": { 83 | "block": "b0c7ab16-7d98-47e3-a0fc-6e7ccc725c9d", 84 | "port": "in" 85 | }, 86 | "size": 4 87 | } 88 | ] 89 | }, 90 | "state": { 91 | "pan": { 92 | "x": -289.7172, 93 | "y": -7.8903 94 | }, 95 | "zoom": 0.9204 96 | } 97 | }, 98 | "dependencies": {} 99 | } -------------------------------------------------------------------------------- /icezum/Counter-hand/src/ServoBit.iceb: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 0.999999988879452 9 | }, 10 | "graph": { 11 | "blocks": [ 12 | { 13 | "id": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 14 | "type": "basic.code", 15 | "data": { 16 | "code": "// @include ServoMotor.v\n\nparameter HIGH = 8'hF0;\nparameter LOW = 8'h50;\n\nreg [7:0] pos = LOW;\n\nServoMotor servo (\n .clk(clk),\n .pos(pos),\n .servo(pwm));\n \nalways @(posedge clk)\n pos <= bit ? HIGH : LOW;\n", 17 | "ports": { 18 | "in": [ 19 | "clk", 20 | "bit" 21 | ], 22 | "out": [ 23 | "pwm" 24 | ] 25 | } 26 | }, 27 | "position": { 28 | "x": 256, 29 | "y": 72 30 | } 31 | }, 32 | { 33 | "id": "4f960c8f-261e-46df-abeb-9ab5a06aa5e1", 34 | "type": "basic.input", 35 | "data": { 36 | "label": "clk" 37 | }, 38 | "position": { 39 | "x": 64, 40 | "y": 104 41 | } 42 | }, 43 | { 44 | "id": "9e703b53-4491-4ff5-9410-b749d5c16800", 45 | "type": "basic.input", 46 | "data": { 47 | "label": "bit" 48 | }, 49 | "position": { 50 | "x": 64, 51 | "y": 232 52 | } 53 | }, 54 | { 55 | "id": "4eefe8d4-9bfe-4a22-9c8d-7e42ae59d28b", 56 | "type": "basic.output", 57 | "data": { 58 | "label": "" 59 | }, 60 | "position": { 61 | "x": 744, 62 | "y": 168 63 | } 64 | } 65 | ], 66 | "wires": [ 67 | { 68 | "source": { 69 | "block": "4f960c8f-261e-46df-abeb-9ab5a06aa5e1", 70 | "port": "out" 71 | }, 72 | "target": { 73 | "block": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 74 | "port": "clk" 75 | } 76 | }, 77 | { 78 | "source": { 79 | "block": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 80 | "port": "pwm" 81 | }, 82 | "target": { 83 | "block": "4eefe8d4-9bfe-4a22-9c8d-7e42ae59d28b", 84 | "port": "in" 85 | } 86 | }, 87 | { 88 | "source": { 89 | "block": "9e703b53-4491-4ff5-9410-b749d5c16800", 90 | "port": "out" 91 | }, 92 | "target": { 93 | "block": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 94 | "port": "bit" 95 | } 96 | } 97 | ] 98 | }, 99 | "deps": {} 100 | } 101 | -------------------------------------------------------------------------------- /icezum/Counter-hand/src/ServoBit.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 0.999999988879452 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 15 | "type": "basic.code", 16 | "data": { 17 | "code": "// @include ServoMotor.v\n\nparameter HIGH = 8'hF0;\nparameter LOW = 8'h50;\n\nreg [7:0] pos = LOW;\n\nServoMotor servo (\n .clk(clk),\n .pos(pos),\n .servo(pwm));\n \nalways @(posedge clk)\n pos <= bit ? HIGH : LOW;\n", 18 | "ports": { 19 | "in": [ 20 | "clk", 21 | "bit" 22 | ], 23 | "out": [ 24 | "pwm" 25 | ] 26 | } 27 | }, 28 | "position": { 29 | "x": 256, 30 | "y": 72 31 | } 32 | }, 33 | { 34 | "id": "4f960c8f-261e-46df-abeb-9ab5a06aa5e1", 35 | "type": "basic.input", 36 | "data": { 37 | "label": "clk", 38 | "pin": { 39 | "name": "CLK", 40 | "value": "21" 41 | } 42 | }, 43 | "position": { 44 | "x": 64, 45 | "y": 104 46 | } 47 | }, 48 | { 49 | "id": "9e703b53-4491-4ff5-9410-b749d5c16800", 50 | "type": "basic.input", 51 | "data": { 52 | "label": "bit", 53 | "pin": { 54 | "name": "SW1", 55 | "value": "10" 56 | } 57 | }, 58 | "position": { 59 | "x": 64, 60 | "y": 232 61 | } 62 | }, 63 | { 64 | "id": "4eefe8d4-9bfe-4a22-9c8d-7e42ae59d28b", 65 | "type": "basic.output", 66 | "data": { 67 | "label": "", 68 | "pin": { 69 | "name": "D13", 70 | "value": "144" 71 | } 72 | }, 73 | "position": { 74 | "x": 744, 75 | "y": 168 76 | } 77 | } 78 | ], 79 | "wires": [ 80 | { 81 | "source": { 82 | "block": "4f960c8f-261e-46df-abeb-9ab5a06aa5e1", 83 | "port": "out" 84 | }, 85 | "target": { 86 | "block": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 87 | "port": "clk" 88 | } 89 | }, 90 | { 91 | "source": { 92 | "block": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 93 | "port": "pwm" 94 | }, 95 | "target": { 96 | "block": "4eefe8d4-9bfe-4a22-9c8d-7e42ae59d28b", 97 | "port": "in" 98 | } 99 | }, 100 | { 101 | "source": { 102 | "block": "9e703b53-4491-4ff5-9410-b749d5c16800", 103 | "port": "out" 104 | }, 105 | "target": { 106 | "block": "f32b562b-e9ba-4237-9a1b-724fb15ec729", 107 | "port": "bit" 108 | } 109 | } 110 | ] 111 | }, 112 | "deps": {} 113 | } 114 | -------------------------------------------------------------------------------- /icezum/Antirrebotes/antirrebotes.iceb: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 1.0000000044160429 9 | }, 10 | "graph": { 11 | "blocks": [ 12 | { 13 | "id": "980b1169-a2fe-411d-9678-c8ad64a801a6", 14 | "type": "basic.code", 15 | "data": { 16 | "code": "//-- Debouncer Circuit\n//-- It produces a stable output when the\n//-- input signal is bouncing\n\nreg btn_prev = 0;\nreg btn_out_r = 0;\n\nreg [16:0] counter = 0;\n\n\nalways @(posedge clk) begin\n\n //-- If btn_prev and btn_in are differents\n if (btn_prev ^ btn_in == 1'b1) begin\n \n //-- Reset the counter\n counter <= 0;\n \n //-- Capture the button status\n btn_prev <= btn_in;\n end\n \n //-- If no timeout, increase the counter\n else if (counter[16] == 1'b0)\n counter <= counter + 1;\n \n else\n //-- Set the output to the stable value\n btn_out_r <= btn_prev;\n\nend\n\nassign btn_out = btn_out_r;\n", 17 | "ports": { 18 | "in": [ 19 | "clk", 20 | "btn_in" 21 | ], 22 | "out": [ 23 | "btn_out" 24 | ] 25 | } 26 | }, 27 | "position": { 28 | "x": 368, 29 | "y": 120 30 | } 31 | }, 32 | { 33 | "id": "4bf41c17-a2da-4140-95f7-2a80d51b1e1a", 34 | "type": "basic.input", 35 | "data": { 36 | "label": "clk" 37 | }, 38 | "position": { 39 | "x": 152, 40 | "y": 152 41 | } 42 | }, 43 | { 44 | "id": "c9e1af2a-6f09-4cf6-a5b3-fdf7ec2c6530", 45 | "type": "basic.input", 46 | "data": { 47 | "label": "btn_in" 48 | }, 49 | "position": { 50 | "x": 152, 51 | "y": 280 52 | } 53 | }, 54 | { 55 | "id": "22ff3fa1-943b-4d1a-bd89-36e1c054d077", 56 | "type": "basic.output", 57 | "data": { 58 | "label": "btn_out" 59 | }, 60 | "position": { 61 | "x": 872, 62 | "y": 216 63 | } 64 | } 65 | ], 66 | "wires": [ 67 | { 68 | "source": { 69 | "block": "4bf41c17-a2da-4140-95f7-2a80d51b1e1a", 70 | "port": "out" 71 | }, 72 | "target": { 73 | "block": "980b1169-a2fe-411d-9678-c8ad64a801a6", 74 | "port": "clk" 75 | } 76 | }, 77 | { 78 | "source": { 79 | "block": "c9e1af2a-6f09-4cf6-a5b3-fdf7ec2c6530", 80 | "port": "out" 81 | }, 82 | "target": { 83 | "block": "980b1169-a2fe-411d-9678-c8ad64a801a6", 84 | "port": "btn_in" 85 | } 86 | }, 87 | { 88 | "source": { 89 | "block": "980b1169-a2fe-411d-9678-c8ad64a801a6", 90 | "port": "btn_out" 91 | }, 92 | "target": { 93 | "block": "22ff3fa1-943b-4d1a-bd89-36e1c054d077", 94 | "port": "in" 95 | } 96 | } 97 | ] 98 | }, 99 | "deps": {} 100 | } -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem04 Preescaler/PreescalerA.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "ce96340a-738a-4847-beaf-13edaf5008ca", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "\r\nwire clk_in;\r\nwire clk_out;\r\n\r\nparameter N=5'd23; //1,4305 Hz fout=fin/2^N\r\n\r\n//-- Registro para implementar contador de N bits\r\nreg [N-1:0] count = 0;\r\n\r\n//-- El bit más significativo se saca por la salida\r\nassign clk_out = count[N-1];\r\n\r\n//-- Contador: se incrementa en flanco de subida\r\nalways @(posedge(clk_in)) begin\r\n count <= count + 1;\r\nend", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "clk_in" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "clk_out" 29 | } 30 | ] 31 | } 32 | }, 33 | "position": { 34 | "x": 320, 35 | "y": 128 36 | }, 37 | "size": { 38 | "width": 656, 39 | "height": 304 40 | } 41 | }, 42 | { 43 | "id": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 44 | "type": "basic.input", 45 | "data": { 46 | "name": "clk_in", 47 | "pins": [ 48 | { 49 | "index": "0", 50 | "name": "CLK", 51 | "value": "21" 52 | } 53 | ], 54 | "virtual": false, 55 | "clock": false 56 | }, 57 | "position": { 58 | "x": 144, 59 | "y": 248 60 | } 61 | }, 62 | { 63 | "id": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 64 | "type": "basic.output", 65 | "data": { 66 | "name": "clk_out", 67 | "pins": [ 68 | { 69 | "index": "0", 70 | "name": "D5", 71 | "value": "95" 72 | } 73 | ], 74 | "virtual": false 75 | }, 76 | "position": { 77 | "x": 1056, 78 | "y": 248 79 | } 80 | } 81 | ], 82 | "wires": [ 83 | { 84 | "source": { 85 | "block": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 86 | "port": "out" 87 | }, 88 | "target": { 89 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 90 | "port": "clk_in" 91 | } 92 | }, 93 | { 94 | "source": { 95 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 96 | "port": "clk_out" 97 | }, 98 | "target": { 99 | "block": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 100 | "port": "in" 101 | } 102 | } 103 | ] 104 | }, 105 | "state": { 106 | "pan": { 107 | "x": -80.4762, 108 | "y": 12.1151 109 | }, 110 | "zoom": 1.1805 111 | } 112 | }, 113 | "dependencies": {} 114 | } -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem04 Preescaler/Ejem04 Preescaler.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "ce96340a-738a-4847-beaf-13edaf5008ca", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "\r\nwire clk_in;\r\nwire clk_out;\r\n\r\n//-- Numero de bits del prescaler (por defecto)\r\nparameter N = 22;\r\n\r\n//-- Registro para implementar contador de N bits\r\nreg [N-1:0] count = 0;\r\n\r\n//-- El bit más significativo se saca por la salida\r\nassign clk_out = count[N-1];\r\n\r\n//-- Contador: se incrementa en flanco de subida\r\nalways @(posedge(clk_in)) begin\r\n count <= count + 1;\r\nend", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "clk_in" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "clk_out" 29 | } 30 | ] 31 | } 32 | }, 33 | "position": { 34 | "x": 320, 35 | "y": 128 36 | }, 37 | "size": { 38 | "width": 656, 39 | "height": 368 40 | } 41 | }, 42 | { 43 | "id": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 44 | "type": "basic.input", 45 | "data": { 46 | "name": "reloj_12MHz", 47 | "pins": [ 48 | { 49 | "index": "0", 50 | "name": "CLK", 51 | "value": "21" 52 | } 53 | ], 54 | "virtual": false, 55 | "clock": false 56 | }, 57 | "position": { 58 | "x": 160, 59 | "y": 280 60 | } 61 | }, 62 | { 63 | "id": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 64 | "type": "basic.output", 65 | "data": { 66 | "name": "led1", 67 | "pins": [ 68 | { 69 | "index": "0", 70 | "name": "D1", 71 | "value": "99" 72 | } 73 | ], 74 | "virtual": false 75 | }, 76 | "position": { 77 | "x": 1104, 78 | "y": 280 79 | } 80 | } 81 | ], 82 | "wires": [ 83 | { 84 | "source": { 85 | "block": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 86 | "port": "out" 87 | }, 88 | "target": { 89 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 90 | "port": "clk_in" 91 | } 92 | }, 93 | { 94 | "source": { 95 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 96 | "port": "clk_out" 97 | }, 98 | "target": { 99 | "block": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 100 | "port": "in" 101 | } 102 | } 103 | ] 104 | }, 105 | "state": { 106 | "pan": { 107 | "x": 0, 108 | "y": 0 109 | }, 110 | "zoom": 1 111 | } 112 | }, 113 | "dependencies": {} 114 | } -------------------------------------------------------------------------------- /icezum/Antirrebotes/antirrebotes.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 1 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "9f21fa7e-ca76-4a66-94f7-b56eb2c7129d", 15 | "type": "basic.input", 16 | "data": { 17 | "label": "clk", 18 | "pin": { 19 | "name": "CLK", 20 | "value": "21" 21 | } 22 | }, 23 | "position": { 24 | "x": 144, 25 | "y": 56 26 | } 27 | }, 28 | { 29 | "id": "4aefb285-b43e-4562-b809-b6ee8aac121f", 30 | "type": "basic.input", 31 | "data": { 32 | "label": "button", 33 | "pin": { 34 | "name": "SW1", 35 | "value": "10" 36 | } 37 | }, 38 | "position": { 39 | "x": 144, 40 | "y": 184 41 | } 42 | }, 43 | { 44 | "id": "6284223f-6129-4437-896b-fb3f4163330e", 45 | "type": "basic.output", 46 | "data": { 47 | "label": "led", 48 | "pin": { 49 | "name": "LED0", 50 | "value": "95" 51 | } 52 | }, 53 | "position": { 54 | "x": 896, 55 | "y": 120 56 | } 57 | }, 58 | { 59 | "id": "730bafd8-c36b-4204-a423-4019fa4de45a", 60 | "type": "basic.code", 61 | "data": { 62 | "code": "//-- Debouncer Circuit\n//-- It produces a stable output when the\n//-- input signal is bouncing\n\nreg btn_prev = 0;\nreg btn_out_r = 0;\n\nreg [16:0] counter = 0;\n\n\nalways @(posedge clk) begin\n\n //-- If btn_prev and btn_in are differents\n if (btn_prev ^ btn_in == 1'b1) begin\n \n //-- Reset the counter\n counter <= 0;\n \n //-- Capture the button status\n btn_prev <= btn_in;\n end\n \n //-- If no timeout, increase the counter\n else if (counter[16] == 1'b0)\n counter <= counter + 1;\n \n else\n //-- Set the output to the stable value\n btn_out_r <= btn_prev;\n\nend\n\nassign btn_out = btn_out_r;\n", 63 | "ports": { 64 | "in": [ 65 | "clk", 66 | "btn_in" 67 | ], 68 | "out": [ 69 | "btn_out" 70 | ] 71 | } 72 | }, 73 | "position": { 74 | "x": 328, 75 | "y": 24 76 | } 77 | } 78 | ], 79 | "wires": [ 80 | { 81 | "source": { 82 | "block": "9f21fa7e-ca76-4a66-94f7-b56eb2c7129d", 83 | "port": "out" 84 | }, 85 | "target": { 86 | "block": "730bafd8-c36b-4204-a423-4019fa4de45a", 87 | "port": "clk" 88 | } 89 | }, 90 | { 91 | "source": { 92 | "block": "4aefb285-b43e-4562-b809-b6ee8aac121f", 93 | "port": "out" 94 | }, 95 | "target": { 96 | "block": "730bafd8-c36b-4204-a423-4019fa4de45a", 97 | "port": "btn_in" 98 | } 99 | }, 100 | { 101 | "source": { 102 | "block": "730bafd8-c36b-4204-a423-4019fa4de45a", 103 | "port": "btn_out" 104 | }, 105 | "target": { 106 | "block": "6284223f-6129-4437-896b-fb3f4163330e", 107 | "port": "in" 108 | } 109 | } 110 | ] 111 | }, 112 | "deps": {} 113 | } -------------------------------------------------------------------------------- /icezum/Antirrebotes/antirrebotes_master.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 1.0000000044160429 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "980b1169-a2fe-411d-9678-c8ad64a801a6", 15 | "type": "basic.code", 16 | "data": { 17 | "code": "//-- Debouncer Circuit\n//-- It produces a stable output when the\n//-- input signal is bouncing\n\nreg btn_prev = 0;\nreg btn_out_r = 0;\n\nreg [16:0] counter = 0;\n\n\nalways @(posedge clk) begin\n\n //-- If btn_prev and btn_in are differents\n if (btn_prev ^ btn_in == 1'b1) begin\n \n //-- Reset the counter\n counter <= 0;\n \n //-- Capture the button status\n btn_prev <= btn_in;\n end\n \n //-- If no timeout, increase the counter\n else if (counter[16] == 1'b0)\n counter <= counter + 1;\n \n else\n //-- Set the output to the stable value\n btn_out_r <= btn_prev;\n\nend\n\nassign btn_out = btn_out_r;\n", 18 | "ports": { 19 | "in": [ 20 | "clk", 21 | "btn_in" 22 | ], 23 | "out": [ 24 | "btn_out" 25 | ] 26 | } 27 | }, 28 | "position": { 29 | "x": 368, 30 | "y": 120 31 | } 32 | }, 33 | { 34 | "id": "4bf41c17-a2da-4140-95f7-2a80d51b1e1a", 35 | "type": "basic.input", 36 | "data": { 37 | "label": "clk", 38 | "pin": { 39 | "name": "CLK", 40 | "value": "21" 41 | } 42 | }, 43 | "position": { 44 | "x": 152, 45 | "y": 152 46 | } 47 | }, 48 | { 49 | "id": "c9e1af2a-6f09-4cf6-a5b3-fdf7ec2c6530", 50 | "type": "basic.input", 51 | "data": { 52 | "label": "btn_in", 53 | "pin": { 54 | "name": "SW1", 55 | "value": "10" 56 | } 57 | }, 58 | "position": { 59 | "x": 152, 60 | "y": 280 61 | } 62 | }, 63 | { 64 | "id": "22ff3fa1-943b-4d1a-bd89-36e1c054d077", 65 | "type": "basic.output", 66 | "data": { 67 | "label": "btn_out", 68 | "pin": { 69 | "name": "LED0", 70 | "value": "95" 71 | } 72 | }, 73 | "position": { 74 | "x": 872, 75 | "y": 216 76 | } 77 | } 78 | ], 79 | "wires": [ 80 | { 81 | "source": { 82 | "block": "4bf41c17-a2da-4140-95f7-2a80d51b1e1a", 83 | "port": "out" 84 | }, 85 | "target": { 86 | "block": "980b1169-a2fe-411d-9678-c8ad64a801a6", 87 | "port": "clk" 88 | } 89 | }, 90 | { 91 | "source": { 92 | "block": "c9e1af2a-6f09-4cf6-a5b3-fdf7ec2c6530", 93 | "port": "out" 94 | }, 95 | "target": { 96 | "block": "980b1169-a2fe-411d-9678-c8ad64a801a6", 97 | "port": "btn_in" 98 | } 99 | }, 100 | { 101 | "source": { 102 | "block": "980b1169-a2fe-411d-9678-c8ad64a801a6", 103 | "port": "btn_out" 104 | }, 105 | "target": { 106 | "block": "22ff3fa1-943b-4d1a-bd89-36e1c054d077", 107 | "port": "in" 108 | } 109 | } 110 | ] 111 | }, 112 | "deps": {} 113 | } -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/BiestableD4bits.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 54 | 86 | 87 | -------------------------------------------------------------------------------- /icezum/Counter-hand/src/Counter.iceb: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 0.9999999479483561 9 | }, 10 | "graph": { 11 | "blocks": [ 12 | { 13 | "id": "289670b6-0d76-4c0e-91ce-23f62b106fa5", 14 | "type": "basic.input", 15 | "data": { 16 | "label": "clk" 17 | }, 18 | "position": { 19 | "x": 64, 20 | "y": 136 21 | } 22 | }, 23 | { 24 | "id": "9f22a42a-6a51-47a4-8e49-e456686d6621", 25 | "type": "basic.output", 26 | "data": { 27 | "label": "c0" 28 | }, 29 | "position": { 30 | "x": 784, 31 | "y": 40 32 | } 33 | }, 34 | { 35 | "id": "362b1fa9-2d17-4fa7-8868-cf48b55b0fd1", 36 | "type": "basic.output", 37 | "data": { 38 | "label": "c1" 39 | }, 40 | "position": { 41 | "x": 784, 42 | "y": 104 43 | } 44 | }, 45 | { 46 | "id": "90f5bb94-a014-454c-9d54-d7809849e996", 47 | "type": "basic.output", 48 | "data": { 49 | "label": "c2" 50 | }, 51 | "position": { 52 | "x": 784, 53 | "y": 168 54 | } 55 | }, 56 | { 57 | "id": "654ce9a0-78e7-4585-952f-abe32f19b2e4", 58 | "type": "basic.output", 59 | "data": { 60 | "label": "c3" 61 | }, 62 | "position": { 63 | "x": 784, 64 | "y": 232 65 | } 66 | }, 67 | { 68 | "id": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 69 | "type": "basic.code", 70 | "data": { 71 | "code": "// Counter 4 bit\n\nreg [3:0] counter;\n\nalways @(posedge clk)\n counter <= counter + 1;\n\nassign c0 = counter[0];\nassign c1 = counter[1];\nassign c2 = counter[2];\nassign c3 = counter[3];\n", 72 | "ports": { 73 | "in": [ 74 | "clk" 75 | ], 76 | "out": [ 77 | "c0", 78 | "c1", 79 | "c2", 80 | "c3" 81 | ] 82 | } 83 | }, 84 | "position": { 85 | "x": 272, 86 | "y": 40 87 | } 88 | } 89 | ], 90 | "wires": [ 91 | { 92 | "source": { 93 | "block": "289670b6-0d76-4c0e-91ce-23f62b106fa5", 94 | "port": "out" 95 | }, 96 | "target": { 97 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 98 | "port": "clk" 99 | } 100 | }, 101 | { 102 | "source": { 103 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 104 | "port": "c0" 105 | }, 106 | "target": { 107 | "block": "9f22a42a-6a51-47a4-8e49-e456686d6621", 108 | "port": "in" 109 | } 110 | }, 111 | { 112 | "source": { 113 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 114 | "port": "c1" 115 | }, 116 | "target": { 117 | "block": "362b1fa9-2d17-4fa7-8868-cf48b55b0fd1", 118 | "port": "in" 119 | } 120 | }, 121 | { 122 | "source": { 123 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 124 | "port": "c2" 125 | }, 126 | "target": { 127 | "block": "90f5bb94-a014-454c-9d54-d7809849e996", 128 | "port": "in" 129 | } 130 | }, 131 | { 132 | "source": { 133 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 134 | "port": "c3" 135 | }, 136 | "target": { 137 | "block": "654ce9a0-78e7-4585-952f-abe32f19b2e4", 138 | "port": "in" 139 | } 140 | } 141 | ] 142 | }, 143 | "deps": {} 144 | } -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/TriState.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 54 | 88 | 89 | -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem03A/Ejem03.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "e1df0459-b66c-4975-be7a-c78a6228db3c", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "\r\n//-- La salida es un registro de 26 bits, inicializado a 0\r\nreg [25:0] data = 0;\r\nwire reloj;\r\nwire [4:0] out;\r\n\r\nassign out[4]=data[25];\r\nassign out[3]=data[24];\r\nassign out[2]=data[23];\r\nassign out[1]=data[22];\r\nassign out[0]=data[21];\r\n\r\n//-- Sensible al flanco de subida\r\nalways @(posedge reloj) begin\r\n //-- Incrementar el registro\r\n data <= data + 1;\r\nend\r\n\r\n", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "reloj" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "out", 29 | "range": "[4:0]", 30 | "size": 5 31 | } 32 | ] 33 | } 34 | }, 35 | "position": { 36 | "x": 128, 37 | "y": 312 38 | }, 39 | "size": { 40 | "width": 464, 41 | "height": 272 42 | } 43 | }, 44 | { 45 | "id": "5916bfde-69e8-4d0a-8080-619d357ceb5f", 46 | "type": "basic.output", 47 | "data": { 48 | "name": "salida", 49 | "range": "[4:0]", 50 | "pins": [ 51 | { 52 | "index": "4", 53 | "name": "D1", 54 | "value": "99" 55 | }, 56 | { 57 | "index": "3", 58 | "name": "D2", 59 | "value": "98" 60 | }, 61 | { 62 | "index": "2", 63 | "name": "D3", 64 | "value": "97" 65 | }, 66 | { 67 | "index": "1", 68 | "name": "D4", 69 | "value": "96" 70 | }, 71 | { 72 | "index": "0", 73 | "name": "D5", 74 | "value": "95" 75 | } 76 | ], 77 | "virtual": false 78 | }, 79 | "position": { 80 | "x": 680, 81 | "y": 352 82 | } 83 | }, 84 | { 85 | "id": "d5d1e33e-f852-46e5-9a9c-de50b44535c3", 86 | "type": "basic.input", 87 | "data": { 88 | "name": "reloj", 89 | "pins": [ 90 | { 91 | "index": "0", 92 | "name": "CLK", 93 | "value": "21" 94 | } 95 | ], 96 | "virtual": false, 97 | "clock": false 98 | }, 99 | "position": { 100 | "x": -16, 101 | "y": 416 102 | } 103 | } 104 | ], 105 | "wires": [ 106 | { 107 | "source": { 108 | "block": "d5d1e33e-f852-46e5-9a9c-de50b44535c3", 109 | "port": "out" 110 | }, 111 | "target": { 112 | "block": "e1df0459-b66c-4975-be7a-c78a6228db3c", 113 | "port": "reloj" 114 | } 115 | }, 116 | { 117 | "source": { 118 | "block": "e1df0459-b66c-4975-be7a-c78a6228db3c", 119 | "port": "out" 120 | }, 121 | "target": { 122 | "block": "5916bfde-69e8-4d0a-8080-619d357ceb5f", 123 | "port": "in" 124 | }, 125 | "size": 5 126 | } 127 | ] 128 | }, 129 | "state": { 130 | "pan": { 131 | "x": 63.303, 132 | "y": -389.9848 133 | }, 134 | "zoom": 1.6439 135 | } 136 | }, 137 | "dependencies": {} 138 | } -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem04 Preescaler/Preescaler.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "cc609333-92dc-477f-91dc-f48e099631c6", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "Nbits", 19 | "value": "5'd24", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 592, 24 | "y": 8 25 | } 26 | }, 27 | { 28 | "id": "ce96340a-738a-4847-beaf-13edaf5008ca", 29 | "type": "basic.code", 30 | "data": { 31 | "code": "\r\nwire clk_in;\r\nwire clk_out;\r\n\r\n//-- Registro para implementar contador de N bits\r\nreg [N-1:0] count = 0;\r\n\r\n//-- El bit más significativo se saca por la salida\r\nassign clk_out = count[N-1];\r\n\r\n//-- Contador: se incrementa en flanco de subida\r\nalways @(posedge(clk_in)) begin\r\n count <= count + 1;\r\nend", 32 | "params": [ 33 | { 34 | "name": "N" 35 | } 36 | ], 37 | "ports": { 38 | "in": [ 39 | { 40 | "name": "clk_in" 41 | } 42 | ], 43 | "out": [ 44 | { 45 | "name": "clk_out" 46 | } 47 | ] 48 | } 49 | }, 50 | "position": { 51 | "x": 320, 52 | "y": 128 53 | }, 54 | "size": { 55 | "width": 640, 56 | "height": 272 57 | } 58 | }, 59 | { 60 | "id": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 61 | "type": "basic.input", 62 | "data": { 63 | "name": "clk_in", 64 | "pins": [ 65 | { 66 | "index": "0", 67 | "name": "CLK", 68 | "value": "21" 69 | } 70 | ], 71 | "virtual": false, 72 | "clock": false 73 | }, 74 | "position": { 75 | "x": 152, 76 | "y": 232 77 | } 78 | }, 79 | { 80 | "id": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 81 | "type": "basic.output", 82 | "data": { 83 | "name": "clk_out", 84 | "pins": [ 85 | { 86 | "index": "0", 87 | "name": "D1", 88 | "value": "99" 89 | } 90 | ], 91 | "virtual": false 92 | }, 93 | "position": { 94 | "x": 1056, 95 | "y": 232 96 | } 97 | } 98 | ], 99 | "wires": [ 100 | { 101 | "source": { 102 | "block": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 103 | "port": "out" 104 | }, 105 | "target": { 106 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 107 | "port": "clk_in" 108 | } 109 | }, 110 | { 111 | "source": { 112 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 113 | "port": "clk_out" 114 | }, 115 | "target": { 116 | "block": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 117 | "port": "in" 118 | } 119 | }, 120 | { 121 | "source": { 122 | "block": "cc609333-92dc-477f-91dc-f48e099631c6", 123 | "port": "constant-out" 124 | }, 125 | "target": { 126 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 127 | "port": "N" 128 | } 129 | } 130 | ] 131 | }, 132 | "state": { 133 | "pan": { 134 | "x": -89.4762, 135 | "y": 64.1151 136 | }, 137 | "zoom": 1.1805 138 | } 139 | }, 140 | "dependencies": {} 141 | } -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem04 Preescaler/Ejem04 Preescaler1.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "cc609333-92dc-477f-91dc-f48e099631c6", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "Nbits", 19 | "value": "5'd24", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 592, 24 | "y": 8 25 | } 26 | }, 27 | { 28 | "id": "ce96340a-738a-4847-beaf-13edaf5008ca", 29 | "type": "basic.code", 30 | "data": { 31 | "code": "\r\nwire clk_in;\r\nwire clk_out;\r\n\r\n//-- Registro para implementar contador de N bits\r\nreg [N-1:0] count = 0;\r\n\r\n//-- El bit más significativo se saca por la salida\r\nassign clk_out = count[N-1];\r\n\r\n//-- Contador: se incrementa en flanco de subida\r\nalways @(posedge(clk_in)) begin\r\n count <= count + 1;\r\nend", 32 | "params": [ 33 | { 34 | "name": "N" 35 | } 36 | ], 37 | "ports": { 38 | "in": [ 39 | { 40 | "name": "clk_in" 41 | } 42 | ], 43 | "out": [ 44 | { 45 | "name": "clk_out" 46 | } 47 | ] 48 | } 49 | }, 50 | "position": { 51 | "x": 320, 52 | "y": 128 53 | }, 54 | "size": { 55 | "width": 640, 56 | "height": 272 57 | } 58 | }, 59 | { 60 | "id": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 61 | "type": "basic.input", 62 | "data": { 63 | "name": "clk_in", 64 | "pins": [ 65 | { 66 | "index": "0", 67 | "name": "CLK", 68 | "value": "21" 69 | } 70 | ], 71 | "virtual": false, 72 | "clock": false 73 | }, 74 | "position": { 75 | "x": 152, 76 | "y": 232 77 | } 78 | }, 79 | { 80 | "id": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 81 | "type": "basic.output", 82 | "data": { 83 | "name": "clk_out", 84 | "pins": [ 85 | { 86 | "index": "0", 87 | "name": "D1", 88 | "value": "99" 89 | } 90 | ], 91 | "virtual": false 92 | }, 93 | "position": { 94 | "x": 1056, 95 | "y": 232 96 | } 97 | } 98 | ], 99 | "wires": [ 100 | { 101 | "source": { 102 | "block": "fb937940-7e76-43f6-9fa2-7c7a94fc08aa", 103 | "port": "out" 104 | }, 105 | "target": { 106 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 107 | "port": "clk_in" 108 | } 109 | }, 110 | { 111 | "source": { 112 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 113 | "port": "clk_out" 114 | }, 115 | "target": { 116 | "block": "b6bb1f67-617d-4193-8d40-a8c217a45ecb", 117 | "port": "in" 118 | } 119 | }, 120 | { 121 | "source": { 122 | "block": "cc609333-92dc-477f-91dc-f48e099631c6", 123 | "port": "constant-out" 124 | }, 125 | "target": { 126 | "block": "ce96340a-738a-4847-beaf-13edaf5008ca", 127 | "port": "N" 128 | } 129 | } 130 | ] 131 | }, 132 | "state": { 133 | "pan": { 134 | "x": -89.4762, 135 | "y": 64.1151 136 | }, 137 | "zoom": 1.1805 138 | } 139 | }, 140 | "dependencies": {} 141 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/counter_8.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Counter 16bits", 5 | "version": "1.0", 6 | "description": "0,1,2,3...n (8 bits)", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "17174045-a45c-4f73-8dd4-50651082b454", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "// 8 bits counter\n\nreg [7:0] d = 0;\n\nalways @(posedge clk)\n d <= d + 1;\n \n", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "clk" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "d", 29 | "range": "[7:0]", 30 | "size": 8 31 | } 32 | ] 33 | } 34 | }, 35 | "position": { 36 | "x": 320, 37 | "y": 136 38 | }, 39 | "size": { 40 | "width": 320, 41 | "height": 144 42 | } 43 | }, 44 | { 45 | "id": "e9690e45-84c1-4ae2-901b-adaae5aee1bc", 46 | "type": "basic.input", 47 | "data": { 48 | "name": "clk", 49 | "pins": [ 50 | { 51 | "index": "0", 52 | "name": "", 53 | "value": "0" 54 | } 55 | ], 56 | "virtual": true, 57 | "clock": false 58 | }, 59 | "position": { 60 | "x": 128, 61 | "y": 176 62 | } 63 | }, 64 | { 65 | "id": "dbc69f51-e494-4c5d-9c0a-be78b68510e3", 66 | "type": "basic.output", 67 | "data": { 68 | "name": "out", 69 | "range": "[7:0]", 70 | "pins": [ 71 | { 72 | "index": "7", 73 | "name": "", 74 | "value": "0" 75 | }, 76 | { 77 | "index": "6", 78 | "name": "", 79 | "value": "0" 80 | }, 81 | { 82 | "index": "5", 83 | "name": "", 84 | "value": "0" 85 | }, 86 | { 87 | "index": "4", 88 | "name": "", 89 | "value": "0" 90 | }, 91 | { 92 | "index": "3", 93 | "name": "", 94 | "value": "0" 95 | }, 96 | { 97 | "index": "2", 98 | "name": "", 99 | "value": "0" 100 | }, 101 | { 102 | "index": "1", 103 | "name": "", 104 | "value": "0" 105 | }, 106 | { 107 | "index": "0", 108 | "name": "", 109 | "value": "0" 110 | } 111 | ], 112 | "virtual": true 113 | }, 114 | "position": { 115 | "x": 712, 116 | "y": 176 117 | } 118 | } 119 | ], 120 | "wires": [ 121 | { 122 | "source": { 123 | "block": "e9690e45-84c1-4ae2-901b-adaae5aee1bc", 124 | "port": "out" 125 | }, 126 | "target": { 127 | "block": "17174045-a45c-4f73-8dd4-50651082b454", 128 | "port": "clk" 129 | } 130 | }, 131 | { 132 | "source": { 133 | "block": "17174045-a45c-4f73-8dd4-50651082b454", 134 | "port": "d" 135 | }, 136 | "target": { 137 | "block": "dbc69f51-e494-4c5d-9c0a-be78b68510e3", 138 | "port": "in" 139 | }, 140 | "size": 8 141 | } 142 | ] 143 | }, 144 | "state": { 145 | "pan": { 146 | "x": 17, 147 | "y": 41 148 | }, 149 | "zoom": 1 150 | } 151 | }, 152 | "dependencies": {} 153 | } -------------------------------------------------------------------------------- /icezum/Counter-hand/src/Counter.ice: -------------------------------------------------------------------------------- 1 | { 2 | "image": "", 3 | "state": { 4 | "pan": { 5 | "x": 0, 6 | "y": 0 7 | }, 8 | "zoom": 0.9999999479483561 9 | }, 10 | "board": "icezum", 11 | "graph": { 12 | "blocks": [ 13 | { 14 | "id": "289670b6-0d76-4c0e-91ce-23f62b106fa5", 15 | "type": "basic.input", 16 | "data": { 17 | "label": "clk", 18 | "pin": { 19 | "name": "CLK", 20 | "value": "21" 21 | } 22 | }, 23 | "position": { 24 | "x": 64, 25 | "y": 136 26 | } 27 | }, 28 | { 29 | "id": "9f22a42a-6a51-47a4-8e49-e456686d6621", 30 | "type": "basic.output", 31 | "data": { 32 | "label": "c0", 33 | "pin": { 34 | "name": "LED0", 35 | "value": "95" 36 | } 37 | }, 38 | "position": { 39 | "x": 784, 40 | "y": 40 41 | } 42 | }, 43 | { 44 | "id": "362b1fa9-2d17-4fa7-8868-cf48b55b0fd1", 45 | "type": "basic.output", 46 | "data": { 47 | "label": "c1", 48 | "pin": { 49 | "name": "LED1", 50 | "value": "96" 51 | } 52 | }, 53 | "position": { 54 | "x": 784, 55 | "y": 104 56 | } 57 | }, 58 | { 59 | "id": "90f5bb94-a014-454c-9d54-d7809849e996", 60 | "type": "basic.output", 61 | "data": { 62 | "label": "c2", 63 | "pin": { 64 | "name": "LED2", 65 | "value": "97" 66 | } 67 | }, 68 | "position": { 69 | "x": 784, 70 | "y": 168 71 | } 72 | }, 73 | { 74 | "id": "654ce9a0-78e7-4585-952f-abe32f19b2e4", 75 | "type": "basic.output", 76 | "data": { 77 | "label": "c3", 78 | "pin": { 79 | "name": "LED3", 80 | "value": "98" 81 | } 82 | }, 83 | "position": { 84 | "x": 784, 85 | "y": 232 86 | } 87 | }, 88 | { 89 | "id": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 90 | "type": "basic.code", 91 | "data": { 92 | "code": "// Counter 4 bit\n\nreg [3:0] counter;\n\nalways @(posedge clk)\n counter <= counter + 1;\n\nassign c0 = counter[0];\nassign c1 = counter[1];\nassign c2 = counter[2];\nassign c3 = counter[3];\n", 93 | "ports": { 94 | "in": [ 95 | "clk" 96 | ], 97 | "out": [ 98 | "c0", 99 | "c1", 100 | "c2", 101 | "c3" 102 | ] 103 | } 104 | }, 105 | "position": { 106 | "x": 272, 107 | "y": 40 108 | } 109 | } 110 | ], 111 | "wires": [ 112 | { 113 | "source": { 114 | "block": "289670b6-0d76-4c0e-91ce-23f62b106fa5", 115 | "port": "out" 116 | }, 117 | "target": { 118 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 119 | "port": "clk" 120 | } 121 | }, 122 | { 123 | "source": { 124 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 125 | "port": "c0" 126 | }, 127 | "target": { 128 | "block": "9f22a42a-6a51-47a4-8e49-e456686d6621", 129 | "port": "in" 130 | } 131 | }, 132 | { 133 | "source": { 134 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 135 | "port": "c1" 136 | }, 137 | "target": { 138 | "block": "362b1fa9-2d17-4fa7-8868-cf48b55b0fd1", 139 | "port": "in" 140 | } 141 | }, 142 | { 143 | "source": { 144 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 145 | "port": "c2" 146 | }, 147 | "target": { 148 | "block": "90f5bb94-a014-454c-9d54-d7809849e996", 149 | "port": "in" 150 | } 151 | }, 152 | { 153 | "source": { 154 | "block": "e7e93a55-9c37-4956-b0a1-0ec928bee3c5", 155 | "port": "c3" 156 | }, 157 | "target": { 158 | "block": "654ce9a0-78e7-4585-952f-abe32f19b2e4", 159 | "port": "in" 160 | } 161 | } 162 | ] 163 | }, 164 | "deps": {} 165 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/PseudoRandomNumber4.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Pseudo Random", 5 | "version": "1.0", 6 | "description": "Generate a Pseudo Random Number", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "9666115a-aff5-4be6-ab10-caf2d924bc47", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "Random_Sum", 19 | "value": "", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 576, 24 | "y": 88 25 | } 26 | }, 27 | { 28 | "id": "94078c1a-e2de-4647-9a09-d980a81fff9b", 29 | "type": "basic.code", 30 | "data": { 31 | "code": "\n// To generate pseudoaleatory numbers\n// each posedge clock ,output number changes\n// pseudo-Randomly in function of Random_Sum\n// parameter\n\n\nreg[3:0] num=0;\n\nlocalparam x = Random_Sum;\n\nalways @(posedge clk)\n num <= num + x;", 32 | "params": [ 33 | { 34 | "name": "Random_Sum" 35 | } 36 | ], 37 | "ports": { 38 | "in": [ 39 | { 40 | "name": "clk" 41 | } 42 | ], 43 | "out": [ 44 | { 45 | "name": "num", 46 | "range": "[3:0]", 47 | "size": 4 48 | } 49 | ] 50 | } 51 | }, 52 | "position": { 53 | "x": 376, 54 | "y": 200 55 | }, 56 | "size": { 57 | "width": 496, 58 | "height": 272 59 | } 60 | }, 61 | { 62 | "id": "562f9f1c-6bd5-4167-8cbb-796797c5eb10", 63 | "type": "basic.input", 64 | "data": { 65 | "name": "clk", 66 | "pins": [ 67 | { 68 | "index": "0", 69 | "name": "", 70 | "value": "0" 71 | } 72 | ], 73 | "virtual": true, 74 | "clock": false 75 | }, 76 | "position": { 77 | "x": 192, 78 | "y": 304 79 | } 80 | }, 81 | { 82 | "id": "8332595d-ee1e-4fbb-8e5f-c2200d81d0b5", 83 | "type": "basic.output", 84 | "data": { 85 | "name": "Num", 86 | "range": "[3:0]", 87 | "pins": [ 88 | { 89 | "index": "3", 90 | "name": "", 91 | "value": "0" 92 | }, 93 | { 94 | "index": "2", 95 | "name": "", 96 | "value": "0" 97 | }, 98 | { 99 | "index": "1", 100 | "name": "", 101 | "value": "0" 102 | }, 103 | { 104 | "index": "0", 105 | "name": "", 106 | "value": "0" 107 | } 108 | ], 109 | "virtual": true 110 | }, 111 | "position": { 112 | "x": 968, 113 | "y": 304 114 | } 115 | } 116 | ], 117 | "wires": [ 118 | { 119 | "source": { 120 | "block": "9666115a-aff5-4be6-ab10-caf2d924bc47", 121 | "port": "constant-out" 122 | }, 123 | "target": { 124 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 125 | "port": "Random_Sum" 126 | } 127 | }, 128 | { 129 | "source": { 130 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 131 | "port": "num" 132 | }, 133 | "target": { 134 | "block": "8332595d-ee1e-4fbb-8e5f-c2200d81d0b5", 135 | "port": "in" 136 | }, 137 | "size": 4 138 | }, 139 | { 140 | "source": { 141 | "block": "562f9f1c-6bd5-4167-8cbb-796797c5eb10", 142 | "port": "out" 143 | }, 144 | "target": { 145 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 146 | "port": "clk" 147 | } 148 | } 149 | ] 150 | }, 151 | "state": { 152 | "pan": { 153 | "x": -4, 154 | "y": 3 155 | }, 156 | "zoom": 1 157 | } 158 | }, 159 | "dependencies": {} 160 | } -------------------------------------------------------------------------------- /alhambraII/svg/Logic-gate-and-us.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 53 | A 64 | B 75 | 79 | 87 | 95 | 100 | out 111 | 112 | -------------------------------------------------------------------------------- /alhambraII/svg/Nand-gate-en.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 50 | A 61 | B 72 | 76 | 84 | 92 | 97 | out 108 | 118 | 119 | -------------------------------------------------------------------------------- /icestick/Otros/Modulos/PseudoRandomNumber8.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Random Number", 5 | "version": "1.0", 6 | "description": "Generate a Pseudo Random Number ", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "9666115a-aff5-4be6-ab10-caf2d924bc47", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "Random_Sum", 19 | "value": "", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 576, 24 | "y": 88 25 | } 26 | }, 27 | { 28 | "id": "94078c1a-e2de-4647-9a09-d980a81fff9b", 29 | "type": "basic.code", 30 | "data": { 31 | "code": "\n// To generate pseudoaleatory numbers\n// each posedge clock ,output number changes\n// pseudo-Randomly in function of Random_Sum\n// parameter\n\n\nreg[7:0] num=0;\n\nlocalparam x = Random_Sum;\n\nalways @(posedge clk)\n num <= num + x;", 32 | "params": [ 33 | { 34 | "name": "Random_Sum" 35 | } 36 | ], 37 | "ports": { 38 | "in": [ 39 | { 40 | "name": "clk" 41 | } 42 | ], 43 | "out": [ 44 | { 45 | "name": "num", 46 | "range": "[7:0]", 47 | "size": 8 48 | } 49 | ] 50 | } 51 | }, 52 | "position": { 53 | "x": 376, 54 | "y": 200 55 | }, 56 | "size": { 57 | "width": 496, 58 | "height": 272 59 | } 60 | }, 61 | { 62 | "id": "503c8237-b25a-477a-bf15-8d8b1573b678", 63 | "type": "basic.input", 64 | "data": { 65 | "name": "clk", 66 | "pins": [ 67 | { 68 | "index": "0", 69 | "name": "", 70 | "value": "0" 71 | } 72 | ], 73 | "virtual": true, 74 | "clock": false 75 | }, 76 | "position": { 77 | "x": 200, 78 | "y": 304 79 | } 80 | }, 81 | { 82 | "id": "b56955ad-2193-4c4c-a65f-4adab8810a90", 83 | "type": "basic.output", 84 | "data": { 85 | "name": "Num", 86 | "range": "[7:0]", 87 | "pins": [ 88 | { 89 | "index": "7", 90 | "name": "", 91 | "value": "0" 92 | }, 93 | { 94 | "index": "6", 95 | "name": "", 96 | "value": "0" 97 | }, 98 | { 99 | "index": "5", 100 | "name": "", 101 | "value": "0" 102 | }, 103 | { 104 | "index": "4", 105 | "name": "", 106 | "value": "0" 107 | }, 108 | { 109 | "index": "3", 110 | "name": "", 111 | "value": "0" 112 | }, 113 | { 114 | "index": "2", 115 | "name": "", 116 | "value": "0" 117 | }, 118 | { 119 | "index": "1", 120 | "name": "", 121 | "value": "0" 122 | }, 123 | { 124 | "index": "0", 125 | "name": "", 126 | "value": "0" 127 | } 128 | ], 129 | "virtual": true 130 | }, 131 | "position": { 132 | "x": 968, 133 | "y": 304 134 | } 135 | } 136 | ], 137 | "wires": [ 138 | { 139 | "source": { 140 | "block": "9666115a-aff5-4be6-ab10-caf2d924bc47", 141 | "port": "constant-out" 142 | }, 143 | "target": { 144 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 145 | "port": "Random_Sum" 146 | } 147 | }, 148 | { 149 | "source": { 150 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 151 | "port": "num" 152 | }, 153 | "target": { 154 | "block": "b56955ad-2193-4c4c-a65f-4adab8810a90", 155 | "port": "in" 156 | }, 157 | "size": 8 158 | }, 159 | { 160 | "source": { 161 | "block": "503c8237-b25a-477a-bf15-8d8b1573b678", 162 | "port": "out" 163 | }, 164 | "target": { 165 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 166 | "port": "clk" 167 | } 168 | } 169 | ] 170 | }, 171 | "state": { 172 | "pan": { 173 | "x": 12.604, 174 | "y": -16.8818 175 | }, 176 | "zoom": 1.0512 177 | } 178 | }, 179 | "dependencies": {} 180 | } -------------------------------------------------------------------------------- /alhambraII/svg/Nor-gate-en.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 50 | A 61 | B 72 | 76 | 84 | 92 | 97 | out 108 | 118 | 119 | -------------------------------------------------------------------------------- /alhambraII/myblocks/myAND.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.2", 3 | "package": { 4 | "name": "MyAND", 5 | "version": "0.1", 6 | "description": "Mi primer bloque de codigo Verilog", 7 | "author": "@agnuca", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22400pt%22%20height=%22192%22%20version=%221%22%3E%3Ctext%20style=%22text-align:start;line-height:125%25%22%20x=%229%22%20y=%2277.174%22%20font-size=%2272%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20x=%229%22%20y=%2277.174%22%3EA%3C/tspan%3E%3C/text%3E%3Ctext%20y=%22155.174%22%20x=%229%22%20style=%22text-align:start;line-height:125%25%22%20font-size=%2272%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20y=%22155.174%22%20x=%229%22%3EB%3C/tspan%3E%3C/text%3E%3Cpath%20d=%22M72%2051h113%22%20id=%22a%22%20fill=%22none%22%20fill-opacity=%22.75%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linecap=%22round%22/%3E%3Cuse%20xlink:href=%22#a%22%20transform=%22translate(0%2078)%22%20width=%22500%22%20height=%22180%22/%3E%3Cuse%20xlink:href=%22#a%22%20transform=%22translate(196.576%2039)%22%20width=%22500%22%20height=%22180%22/%3E%3Cpath%20d=%22M207%20171h-71.3V12.5h71.76c38.898%200%2070.84%2035.504%2070.84%2079.25S246.358%20171%20207%20171z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22text-align:start;line-height:125%25%22%20x=%22395.412%22%20y=%22109.236%22%20font-size=%2256%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20x=%22395.412%22%20y=%22109.236%22%3Eout%3C/tspan%3E%3C/text%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "alhambra-ii", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "a", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "", 23 | "value": "" 24 | } 25 | ], 26 | "virtual": true, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 24, 31 | "y": 88 32 | } 33 | }, 34 | { 35 | "id": "9c358b80-d9c0-47d9-9838-39ea9f802301", 36 | "type": "basic.output", 37 | "data": { 38 | "name": "c", 39 | "pins": [ 40 | { 41 | "index": "0", 42 | "name": "", 43 | "value": "" 44 | } 45 | ], 46 | "virtual": true 47 | }, 48 | "position": { 49 | "x": 520, 50 | "y": 160 51 | } 52 | }, 53 | { 54 | "id": "08e5ed7d-def2-4701-a057-ace942b10217", 55 | "type": "basic.input", 56 | "data": { 57 | "name": "b", 58 | "pins": [ 59 | { 60 | "index": "0", 61 | "name": "", 62 | "value": "" 63 | } 64 | ], 65 | "virtual": true, 66 | "clock": false 67 | }, 68 | "position": { 69 | "x": 32, 70 | "y": 216 71 | } 72 | }, 73 | { 74 | "id": "dcfff435-d430-4c04-ae25-680fce104366", 75 | "type": "basic.code", 76 | "data": { 77 | "code": "\nassign c = b & a;\n", 78 | "params": [], 79 | "ports": { 80 | "in": [ 81 | { 82 | "name": "a" 83 | }, 84 | { 85 | "name": "b" 86 | } 87 | ], 88 | "out": [ 89 | { 90 | "name": "c" 91 | } 92 | ] 93 | } 94 | }, 95 | "position": { 96 | "x": 248, 97 | "y": 112 98 | }, 99 | "size": { 100 | "width": 224, 101 | "height": 160 102 | } 103 | } 104 | ], 105 | "wires": [ 106 | { 107 | "source": { 108 | "block": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 109 | "port": "out" 110 | }, 111 | "target": { 112 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 113 | "port": "a" 114 | } 115 | }, 116 | { 117 | "source": { 118 | "block": "08e5ed7d-def2-4701-a057-ace942b10217", 119 | "port": "out" 120 | }, 121 | "target": { 122 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 123 | "port": "b" 124 | } 125 | }, 126 | { 127 | "source": { 128 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 129 | "port": "c" 130 | }, 131 | "target": { 132 | "block": "9c358b80-d9c0-47d9-9838-39ea9f802301", 133 | "port": "in" 134 | } 135 | } 136 | ] 137 | } 138 | }, 139 | "dependencies": {} 140 | } -------------------------------------------------------------------------------- /icestick/Otros/tutorial Obijuan using IceStudio/Ejem03/Ejem03.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "e1df0459-b66c-4975-be7a-c78a6228db3c", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "\r\nwire clk;\r\n\r\n//-- La salida es un registro de 26 bits, inicializado a 0\r\nreg [25:0] data = 0;\r\n\r\n//-- Sensible al flanco de subida\r\nalways @(posedge reloj) begin\r\n //-- Incrementar el registro\r\n data <= data + 1;\r\nend", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "reloj" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "data", 29 | "range": "[25:0]", 30 | "size": 26 31 | } 32 | ] 33 | } 34 | }, 35 | "position": { 36 | "x": 128, 37 | "y": 312 38 | }, 39 | "size": { 40 | "width": 464, 41 | "height": 272 42 | } 43 | }, 44 | { 45 | "id": "5916bfde-69e8-4d0a-8080-619d357ceb5f", 46 | "type": "basic.output", 47 | "data": { 48 | "name": "out", 49 | "range": "[4:0]", 50 | "pins": [ 51 | { 52 | "index": "4", 53 | "name": "D1", 54 | "value": "99" 55 | }, 56 | { 57 | "index": "3", 58 | "name": "D2", 59 | "value": "98" 60 | }, 61 | { 62 | "index": "2", 63 | "name": "D3", 64 | "value": "97" 65 | }, 66 | { 67 | "index": "1", 68 | "name": "D4", 69 | "value": "96" 70 | }, 71 | { 72 | "index": "0", 73 | "name": "D5", 74 | "value": "95" 75 | } 76 | ], 77 | "virtual": false 78 | }, 79 | "position": { 80 | "x": 1128, 81 | "y": 352 82 | } 83 | }, 84 | { 85 | "id": "e4985f08-c566-443c-a253-d295506c25a6", 86 | "type": "basic.code", 87 | "data": { 88 | "code": "\nassign in[25]=out[4];\nassign in[24]=out[3];\nassign in[23]=out[2];\nassign in[22]=out[1];\nassign in[21]=out[0];", 89 | "params": [], 90 | "ports": { 91 | "in": [ 92 | { 93 | "name": "in", 94 | "range": "[25:0]", 95 | "size": 26 96 | } 97 | ], 98 | "out": [ 99 | { 100 | "name": "out", 101 | "range": "[4:0]", 102 | "size": 5 103 | } 104 | ] 105 | } 106 | }, 107 | "position": { 108 | "x": 736, 109 | "y": 376 110 | }, 111 | "size": { 112 | "width": 320, 113 | "height": 144 114 | } 115 | }, 116 | { 117 | "id": "d5d1e33e-f852-46e5-9a9c-de50b44535c3", 118 | "type": "basic.input", 119 | "data": { 120 | "name": "reloj", 121 | "pins": [ 122 | { 123 | "index": "0", 124 | "name": "CLK", 125 | "value": "21" 126 | } 127 | ], 128 | "virtual": false, 129 | "clock": false 130 | }, 131 | "position": { 132 | "x": -16, 133 | "y": 416 134 | } 135 | } 136 | ], 137 | "wires": [ 138 | { 139 | "source": { 140 | "block": "d5d1e33e-f852-46e5-9a9c-de50b44535c3", 141 | "port": "out" 142 | }, 143 | "target": { 144 | "block": "e1df0459-b66c-4975-be7a-c78a6228db3c", 145 | "port": "reloj" 146 | } 147 | }, 148 | { 149 | "source": { 150 | "block": "e1df0459-b66c-4975-be7a-c78a6228db3c", 151 | "port": "data" 152 | }, 153 | "target": { 154 | "block": "e4985f08-c566-443c-a253-d295506c25a6", 155 | "port": "in" 156 | }, 157 | "size": 26 158 | }, 159 | { 160 | "source": { 161 | "block": "e4985f08-c566-443c-a253-d295506c25a6", 162 | "port": "out" 163 | }, 164 | "target": { 165 | "block": "5916bfde-69e8-4d0a-8080-619d357ceb5f", 166 | "port": "in" 167 | }, 168 | "size": 5 169 | } 170 | ] 171 | }, 172 | "state": { 173 | "pan": { 174 | "x": 111, 175 | "y": -123 176 | }, 177 | "zoom": 1 178 | } 179 | }, 180 | "dependencies": {} 181 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/counter_16.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Counter 16bits", 5 | "version": "1.0", 6 | "description": "0,1,2,3...n (16 bits)", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "17174045-a45c-4f73-8dd4-50651082b454", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "// 16 bits counter\n\nreg [15:0] d = 0;\n\nalways @(posedge clk)\n d <= d + 1;\n \n", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "clk" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "d", 29 | "range": "[15:0]", 30 | "size": 16 31 | } 32 | ] 33 | } 34 | }, 35 | "position": { 36 | "x": 320, 37 | "y": 136 38 | }, 39 | "size": { 40 | "width": 320, 41 | "height": 144 42 | } 43 | }, 44 | { 45 | "id": "e9690e45-84c1-4ae2-901b-adaae5aee1bc", 46 | "type": "basic.input", 47 | "data": { 48 | "name": "clk", 49 | "pins": [ 50 | { 51 | "index": "0", 52 | "name": "", 53 | "value": "0" 54 | } 55 | ], 56 | "virtual": true, 57 | "clock": false 58 | }, 59 | "position": { 60 | "x": 128, 61 | "y": 176 62 | } 63 | }, 64 | { 65 | "id": "1a66d475-67a2-4ff2-931e-3d98cd3e0da9", 66 | "type": "basic.output", 67 | "data": { 68 | "name": "out", 69 | "range": "[15:0]", 70 | "pins": [ 71 | { 72 | "index": "15", 73 | "name": "", 74 | "value": "0" 75 | }, 76 | { 77 | "index": "14", 78 | "name": "", 79 | "value": "0" 80 | }, 81 | { 82 | "index": "13", 83 | "name": "", 84 | "value": "0" 85 | }, 86 | { 87 | "index": "12", 88 | "name": "", 89 | "value": "0" 90 | }, 91 | { 92 | "index": "11", 93 | "name": "", 94 | "value": "0" 95 | }, 96 | { 97 | "index": "10", 98 | "name": "", 99 | "value": "0" 100 | }, 101 | { 102 | "index": "9", 103 | "name": "", 104 | "value": "0" 105 | }, 106 | { 107 | "index": "8", 108 | "name": "", 109 | "value": "0" 110 | }, 111 | { 112 | "index": "7", 113 | "name": "", 114 | "value": "0" 115 | }, 116 | { 117 | "index": "6", 118 | "name": "", 119 | "value": "0" 120 | }, 121 | { 122 | "index": "5", 123 | "name": "", 124 | "value": "0" 125 | }, 126 | { 127 | "index": "4", 128 | "name": "", 129 | "value": "0" 130 | }, 131 | { 132 | "index": "3", 133 | "name": "", 134 | "value": "0" 135 | }, 136 | { 137 | "index": "2", 138 | "name": "", 139 | "value": "0" 140 | }, 141 | { 142 | "index": "1", 143 | "name": "", 144 | "value": "0" 145 | }, 146 | { 147 | "index": "0", 148 | "name": "", 149 | "value": "0" 150 | } 151 | ], 152 | "virtual": true 153 | }, 154 | "position": { 155 | "x": 712, 156 | "y": 176 157 | } 158 | } 159 | ], 160 | "wires": [ 161 | { 162 | "source": { 163 | "block": "e9690e45-84c1-4ae2-901b-adaae5aee1bc", 164 | "port": "out" 165 | }, 166 | "target": { 167 | "block": "17174045-a45c-4f73-8dd4-50651082b454", 168 | "port": "clk" 169 | } 170 | }, 171 | { 172 | "source": { 173 | "block": "17174045-a45c-4f73-8dd4-50651082b454", 174 | "port": "d" 175 | }, 176 | "target": { 177 | "block": "1a66d475-67a2-4ff2-931e-3d98cd3e0da9", 178 | "port": "in" 179 | }, 180 | "size": 16 181 | } 182 | ] 183 | }, 184 | "state": { 185 | "pan": { 186 | "x": 15, 187 | "y": 41 188 | }, 189 | "zoom": 1 190 | } 191 | }, 192 | "dependencies": {} 193 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/PseudoRandomInitialNumber4.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Pseudo Random", 5 | "version": "1.0", 6 | "description": "Generate a Pseudo Random number of 16 bits", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "9666115a-aff5-4be6-ab10-caf2d924bc47", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "R", 19 | "value": "", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 456, 24 | "y": 88 25 | } 26 | }, 27 | { 28 | "id": "00eb7935-02c1-4e71-9301-17113d267883", 29 | "type": "basic.constant", 30 | "data": { 31 | "name": "i", 32 | "value": "", 33 | "local": false 34 | }, 35 | "position": { 36 | "x": 704, 37 | "y": 88 38 | } 39 | }, 40 | { 41 | "id": "94078c1a-e2de-4647-9a09-d980a81fff9b", 42 | "type": "basic.code", 43 | "data": { 44 | "code": "\n// To generate pseudoaleatory numbers\n// each posedge clock ,output number changes\n// pseudo-Randomly in function of Random_Sum\n// parameter\n\nlocalparam x = Random_Sum;\n\nreg[3:0] num=Initial_Value;\n\nalways @(posedge clk)\n num <= num + x;", 45 | "params": [ 46 | { 47 | "name": "Random_Sum" 48 | }, 49 | { 50 | "name": "Initial_Value" 51 | } 52 | ], 53 | "ports": { 54 | "in": [ 55 | { 56 | "name": "clk" 57 | } 58 | ], 59 | "out": [ 60 | { 61 | "name": "num", 62 | "range": "[3:0]", 63 | "size": 4 64 | } 65 | ] 66 | } 67 | }, 68 | "position": { 69 | "x": 376, 70 | "y": 200 71 | }, 72 | "size": { 73 | "width": 496, 74 | "height": 272 75 | } 76 | }, 77 | { 78 | "id": "1131d05a-0312-427c-98bb-72230e09415a", 79 | "type": "basic.input", 80 | "data": { 81 | "name": "clk", 82 | "pins": [ 83 | { 84 | "index": "0", 85 | "name": "", 86 | "value": "0" 87 | } 88 | ], 89 | "virtual": true, 90 | "clock": false 91 | }, 92 | "position": { 93 | "x": 184, 94 | "y": 304 95 | } 96 | }, 97 | { 98 | "id": "70c0ab6d-7ae4-416a-8506-be7069f9a117", 99 | "type": "basic.output", 100 | "data": { 101 | "name": "Num", 102 | "range": "[3:0]", 103 | "pins": [ 104 | { 105 | "index": "3", 106 | "name": "", 107 | "value": "0" 108 | }, 109 | { 110 | "index": "2", 111 | "name": "", 112 | "value": "0" 113 | }, 114 | { 115 | "index": "1", 116 | "name": "", 117 | "value": "0" 118 | }, 119 | { 120 | "index": "0", 121 | "name": "", 122 | "value": "0" 123 | } 124 | ], 125 | "virtual": true 126 | }, 127 | "position": { 128 | "x": 976, 129 | "y": 304 130 | } 131 | } 132 | ], 133 | "wires": [ 134 | { 135 | "source": { 136 | "block": "9666115a-aff5-4be6-ab10-caf2d924bc47", 137 | "port": "constant-out" 138 | }, 139 | "target": { 140 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 141 | "port": "Random_Sum" 142 | } 143 | }, 144 | { 145 | "source": { 146 | "block": "1131d05a-0312-427c-98bb-72230e09415a", 147 | "port": "out" 148 | }, 149 | "target": { 150 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 151 | "port": "clk" 152 | } 153 | }, 154 | { 155 | "source": { 156 | "block": "00eb7935-02c1-4e71-9301-17113d267883", 157 | "port": "constant-out" 158 | }, 159 | "target": { 160 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 161 | "port": "Initial_Value" 162 | } 163 | }, 164 | { 165 | "source": { 166 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 167 | "port": "num" 168 | }, 169 | "target": { 170 | "block": "70c0ab6d-7ae4-416a-8506-be7069f9a117", 171 | "port": "in" 172 | }, 173 | "size": 4 174 | } 175 | ] 176 | }, 177 | "state": { 178 | "pan": { 179 | "x": -4, 180 | "y": 3 181 | }, 182 | "zoom": 1 183 | } 184 | }, 185 | "dependencies": {} 186 | } -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/Buffer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 54 | 105 | 106 | -------------------------------------------------------------------------------- /alhambraII/myblocks/myAND3.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.2", 3 | "package": { 4 | "name": "MyAND3", 5 | "version": "0.1", 6 | "description": "AND 3 IN", 7 | "author": "@agnuca", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22100%22%20height=%2250%22%20version=%221%22%3E%3Cpath%20d=%22M70%2025h25M31%2012H5M32%2038H5%22%20fill=%22none%22%20stroke=%22#000%22%20stroke-width=%222%22/%3E%3Cpath%20style=%22text-indent:0;text-align:start;line-height:normal;text-transform:none;block-progression:tb;marker:none;-inkscape-font-specification:Bitstream%20Vera%20Sans%22%20d=%22M30%205V45h20.476c11.268%200%2020-9%2020-20s-8.732-20-20-20H30zm2.857%202.857h17.619c9.76%200%2016.667%207.64%2016.667%2017.143S59.76%2042.143%2050%2042.143H32.857V7.857z%22%20font-weight=%22400%22%20overflow=%22visible%22%20font-family=%22Bitstream%20Vera%20Sans%22/%3E%3Cpath%20d=%22M31%2025H5%22%20fill=%22none%22%20stroke=%22#000%22%20stroke-width=%222%22/%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "alhambra-ii", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "a", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "", 23 | "value": "" 24 | } 25 | ], 26 | "virtual": true, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 24, 31 | "y": 88 32 | } 33 | }, 34 | { 35 | "id": "9c358b80-d9c0-47d9-9838-39ea9f802301", 36 | "type": "basic.output", 37 | "data": { 38 | "name": "d", 39 | "pins": [ 40 | { 41 | "index": "0", 42 | "name": "", 43 | "value": "" 44 | } 45 | ], 46 | "virtual": true 47 | }, 48 | "position": { 49 | "x": 520, 50 | "y": 160 51 | } 52 | }, 53 | { 54 | "id": "08e5ed7d-def2-4701-a057-ace942b10217", 55 | "type": "basic.input", 56 | "data": { 57 | "name": "b", 58 | "pins": [ 59 | { 60 | "index": "0", 61 | "name": "", 62 | "value": "" 63 | } 64 | ], 65 | "virtual": true, 66 | "clock": false 67 | }, 68 | "position": { 69 | "x": 16, 70 | "y": 176 71 | } 72 | }, 73 | { 74 | "id": "37ce8732-02b8-42bd-951f-7b52a16f2c19", 75 | "type": "basic.input", 76 | "data": { 77 | "name": "c", 78 | "pins": [ 79 | { 80 | "index": "0", 81 | "name": "", 82 | "value": "" 83 | } 84 | ], 85 | "virtual": true, 86 | "clock": false 87 | }, 88 | "position": { 89 | "x": 24, 90 | "y": 264 91 | } 92 | }, 93 | { 94 | "id": "dcfff435-d430-4c04-ae25-680fce104366", 95 | "type": "basic.code", 96 | "data": { 97 | "code": "assign d = c & b & a;\n", 98 | "params": [], 99 | "ports": { 100 | "in": [ 101 | { 102 | "name": "a" 103 | }, 104 | { 105 | "name": "b" 106 | }, 107 | { 108 | "name": "c" 109 | } 110 | ], 111 | "out": [ 112 | { 113 | "name": "d" 114 | } 115 | ] 116 | } 117 | }, 118 | "position": { 119 | "x": 248, 120 | "y": 112 121 | }, 122 | "size": { 123 | "width": 224, 124 | "height": 160 125 | } 126 | } 127 | ], 128 | "wires": [ 129 | { 130 | "source": { 131 | "block": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 132 | "port": "out" 133 | }, 134 | "target": { 135 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 136 | "port": "a" 137 | } 138 | }, 139 | { 140 | "source": { 141 | "block": "08e5ed7d-def2-4701-a057-ace942b10217", 142 | "port": "out" 143 | }, 144 | "target": { 145 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 146 | "port": "b" 147 | } 148 | }, 149 | { 150 | "source": { 151 | "block": "37ce8732-02b8-42bd-951f-7b52a16f2c19", 152 | "port": "out" 153 | }, 154 | "target": { 155 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 156 | "port": "c" 157 | } 158 | }, 159 | { 160 | "source": { 161 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 162 | "port": "d" 163 | }, 164 | "target": { 165 | "block": "9c358b80-d9c0-47d9-9838-39ea9f802301", 166 | "port": "in" 167 | } 168 | } 169 | ] 170 | } 171 | }, 172 | "dependencies": {} 173 | } -------------------------------------------------------------------------------- /alhambraII/myblocks/myNAND.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.2", 3 | "package": { 4 | "name": "MyNAND", 5 | "version": "0.1", 6 | "description": "2nd block", 7 | "author": "@agnuca", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22400pt%22%20height=%22192%22%20version=%221%22%3E%3Ctext%20style=%22text-align:start;line-height:125%25%22%20x=%229%22%20y=%2277.174%22%20font-size=%2272%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20x=%229%22%20y=%2277.174%22%3EA%3C/tspan%3E%3C/text%3E%3Ctext%20y=%22155.174%22%20x=%229%22%20style=%22text-align:start;line-height:125%25%22%20font-size=%2272%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20y=%22155.174%22%20x=%229%22%3EB%3C/tspan%3E%3C/text%3E%3Cpath%20d=%22M72%2051h113%22%20id=%22a%22%20fill=%22none%22%20fill-opacity=%22.75%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linecap=%22round%22/%3E%3Cuse%20xlink:href=%22#a%22%20transform=%22translate(0%2078)%22%20width=%22500%22%20height=%22180%22/%3E%3Cuse%20xlink:href=%22#a%22%20transform=%22translate(196.576%2039)%22%20width=%22500%22%20height=%22180%22/%3E%3Cpath%20d=%22M207%20171h-71.3V12.5h71.76c38.898%200%2070.84%2035.504%2070.84%2079.25S246.358%20171%20207%20171z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22text-align:start;line-height:125%25%22%20x=%22395.412%22%20y=%22109.236%22%20font-size=%2256%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20x=%22395.412%22%20y=%22109.236%22%3Eout%3C/tspan%3E%3C/text%3E%3Cpath%20d=%22M318.38%2089.49a20.153%2020.153%200%201%201-40.305%200%2020.153%2020.153%200%201%201%2040.305%200z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "alhambra-ii", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "a", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "", 23 | "value": "" 24 | } 25 | ], 26 | "virtual": true, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 24, 31 | "y": 88 32 | } 33 | }, 34 | { 35 | "id": "9c358b80-d9c0-47d9-9838-39ea9f802301", 36 | "type": "basic.output", 37 | "data": { 38 | "name": "c", 39 | "pins": [ 40 | { 41 | "index": "0", 42 | "name": "", 43 | "value": "" 44 | } 45 | ], 46 | "virtual": true 47 | }, 48 | "position": { 49 | "x": 520, 50 | "y": 160 51 | } 52 | }, 53 | { 54 | "id": "08e5ed7d-def2-4701-a057-ace942b10217", 55 | "type": "basic.input", 56 | "data": { 57 | "name": "b", 58 | "pins": [ 59 | { 60 | "index": "0", 61 | "name": "", 62 | "value": "" 63 | } 64 | ], 65 | "virtual": true, 66 | "clock": false 67 | }, 68 | "position": { 69 | "x": 16, 70 | "y": 232 71 | } 72 | }, 73 | { 74 | "id": "dcfff435-d430-4c04-ae25-680fce104366", 75 | "type": "basic.code", 76 | "data": { 77 | "code": "\nassign c = ~(b & a);\n", 78 | "params": [], 79 | "ports": { 80 | "in": [ 81 | { 82 | "name": "a" 83 | }, 84 | { 85 | "name": "b" 86 | } 87 | ], 88 | "out": [ 89 | { 90 | "name": "c" 91 | } 92 | ] 93 | } 94 | }, 95 | "position": { 96 | "x": 208, 97 | "y": 112 98 | }, 99 | "size": { 100 | "width": 224, 101 | "height": 160 102 | } 103 | } 104 | ], 105 | "wires": [ 106 | { 107 | "source": { 108 | "block": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 109 | "port": "out" 110 | }, 111 | "target": { 112 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 113 | "port": "a" 114 | } 115 | }, 116 | { 117 | "source": { 118 | "block": "08e5ed7d-def2-4701-a057-ace942b10217", 119 | "port": "out" 120 | }, 121 | "target": { 122 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 123 | "port": "b" 124 | } 125 | }, 126 | { 127 | "source": { 128 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 129 | "port": "c" 130 | }, 131 | "target": { 132 | "block": "9c358b80-d9c0-47d9-9838-39ea9f802301", 133 | "port": "in" 134 | } 135 | } 136 | ] 137 | } 138 | }, 139 | "dependencies": {} 140 | } -------------------------------------------------------------------------------- /alhambraII/myblocks/myNOR.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.2", 3 | "package": { 4 | "name": "MyNOR", 5 | "version": "0.1", 6 | "description": "3nd block", 7 | "author": "@agnuca", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22400pt%22%20height=%22192%22%20version=%221%22%3E%3Ctext%20style=%22text-align:start;line-height:125%25%22%20x=%229%22%20y=%2277.174%22%20font-size=%2272%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20x=%229%22%20y=%2277.174%22%3EA%3C/tspan%3E%3C/text%3E%3Ctext%20y=%22155.174%22%20x=%229%22%20style=%22text-align:start;line-height:125%25%22%20font-size=%2272%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20y=%22155.174%22%20x=%229%22%3EB%3C/tspan%3E%3C/text%3E%3Cpath%20d=%22M72%2051h113%22%20id=%22a%22%20fill=%22none%22%20fill-opacity=%22.75%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linecap=%22round%22/%3E%3Cuse%20xlink:href=%22#a%22%20transform=%22translate(0%2078)%22%20width=%22500%22%20height=%22180%22/%3E%3Cuse%20xlink:href=%22#a%22%20transform=%22translate(196.576%2039)%22%20width=%22500%22%20height=%22180%22/%3E%3Cpath%20d=%22M135.674%20169.25c-.125.005%2037.443-7.436%2037.443-79.25%200-72.521-37.446-79.25-37.443-79.25%2060.487%207.264%2099.88-3.023%20141.51%2079.25-31.04%2072.746-71.75%2076.199-141.51%2079.25z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linejoin=%22round%22/%3E%3Ctext%20style=%22text-align:start;line-height:125%25%22%20x=%22395.412%22%20y=%22109.236%22%20font-size=%2256%22%20font-weight=%22400%22%20font-family=%22Verdana%22%3E%3Ctspan%20x=%22395.412%22%20y=%22109.236%22%3Eout%3C/tspan%3E%3C/text%3E%3Cpath%20d=%22M318.115%2090a20.153%2020.153%200%201%201-40.305%200%2020.153%2020.153%200%201%201%2040.305%200z%22%20fill=%22#fff%22%20fill-rule=%22evenodd%22%20stroke=%22#000%22%20stroke-width=%227.5%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "alhambra-ii", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "a", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "", 23 | "value": "" 24 | } 25 | ], 26 | "virtual": true, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 24, 31 | "y": 88 32 | } 33 | }, 34 | { 35 | "id": "9c358b80-d9c0-47d9-9838-39ea9f802301", 36 | "type": "basic.output", 37 | "data": { 38 | "name": "c", 39 | "pins": [ 40 | { 41 | "index": "0", 42 | "name": "", 43 | "value": "" 44 | } 45 | ], 46 | "virtual": true 47 | }, 48 | "position": { 49 | "x": 520, 50 | "y": 160 51 | } 52 | }, 53 | { 54 | "id": "08e5ed7d-def2-4701-a057-ace942b10217", 55 | "type": "basic.input", 56 | "data": { 57 | "name": "b", 58 | "pins": [ 59 | { 60 | "index": "0", 61 | "name": "", 62 | "value": "" 63 | } 64 | ], 65 | "virtual": true, 66 | "clock": false 67 | }, 68 | "position": { 69 | "x": 16, 70 | "y": 232 71 | } 72 | }, 73 | { 74 | "id": "dcfff435-d430-4c04-ae25-680fce104366", 75 | "type": "basic.code", 76 | "data": { 77 | "code": "\nassign c = ~(b | a);\n", 78 | "params": [], 79 | "ports": { 80 | "in": [ 81 | { 82 | "name": "a" 83 | }, 84 | { 85 | "name": "b" 86 | } 87 | ], 88 | "out": [ 89 | { 90 | "name": "c" 91 | } 92 | ] 93 | } 94 | }, 95 | "position": { 96 | "x": 208, 97 | "y": 112 98 | }, 99 | "size": { 100 | "width": 224, 101 | "height": 160 102 | } 103 | } 104 | ], 105 | "wires": [ 106 | { 107 | "source": { 108 | "block": "e6f853e5-4d09-465d-9b29-a7444f6c39f2", 109 | "port": "out" 110 | }, 111 | "target": { 112 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 113 | "port": "a" 114 | } 115 | }, 116 | { 117 | "source": { 118 | "block": "08e5ed7d-def2-4701-a057-ace942b10217", 119 | "port": "out" 120 | }, 121 | "target": { 122 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 123 | "port": "b" 124 | } 125 | }, 126 | { 127 | "source": { 128 | "block": "dcfff435-d430-4c04-ae25-680fce104366", 129 | "port": "c" 130 | }, 131 | "target": { 132 | "block": "9c358b80-d9c0-47d9-9838-39ea9f802301", 133 | "port": "in" 134 | } 135 | } 136 | ] 137 | } 138 | }, 139 | "dependencies": {} 140 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/PseudoRandomInitialNumber8.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Pseudo Random", 5 | "version": "1.0", 6 | "description": "Generate a Pseudo Random number of 16 bits", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "9666115a-aff5-4be6-ab10-caf2d924bc47", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "R", 19 | "value": "", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 456, 24 | "y": 88 25 | } 26 | }, 27 | { 28 | "id": "00eb7935-02c1-4e71-9301-17113d267883", 29 | "type": "basic.constant", 30 | "data": { 31 | "name": "i", 32 | "value": "", 33 | "local": false 34 | }, 35 | "position": { 36 | "x": 704, 37 | "y": 88 38 | } 39 | }, 40 | { 41 | "id": "94078c1a-e2de-4647-9a09-d980a81fff9b", 42 | "type": "basic.code", 43 | "data": { 44 | "code": "\n// To generate pseudoaleatory numbers\n// each posedge clock ,output number changes\n// pseudo-Randomly in function of Random_Sum\n// parameter\n\nreg[7:0] num=Initial_Value;\n\nlocalparam x = Random_Sum;\n\nalways @(posedge clk)\n num <= num + x;", 45 | "params": [ 46 | { 47 | "name": "Random_Sum" 48 | }, 49 | { 50 | "name": "Initial_Value" 51 | } 52 | ], 53 | "ports": { 54 | "in": [ 55 | { 56 | "name": "clk" 57 | } 58 | ], 59 | "out": [ 60 | { 61 | "name": "num", 62 | "range": "[7:0]", 63 | "size": 8 64 | } 65 | ] 66 | } 67 | }, 68 | "position": { 69 | "x": 376, 70 | "y": 200 71 | }, 72 | "size": { 73 | "width": 496, 74 | "height": 272 75 | } 76 | }, 77 | { 78 | "id": "1131d05a-0312-427c-98bb-72230e09415a", 79 | "type": "basic.input", 80 | "data": { 81 | "name": "clk", 82 | "pins": [ 83 | { 84 | "index": "0", 85 | "name": "", 86 | "value": "0" 87 | } 88 | ], 89 | "virtual": true, 90 | "clock": false 91 | }, 92 | "position": { 93 | "x": 184, 94 | "y": 304 95 | } 96 | }, 97 | { 98 | "id": "5fb6f12d-a5de-4213-ad10-27f884c65287", 99 | "type": "basic.output", 100 | "data": { 101 | "name": "Num", 102 | "range": "[7:0]", 103 | "pins": [ 104 | { 105 | "index": "7", 106 | "name": "", 107 | "value": "0" 108 | }, 109 | { 110 | "index": "6", 111 | "name": "", 112 | "value": "0" 113 | }, 114 | { 115 | "index": "5", 116 | "name": "", 117 | "value": "0" 118 | }, 119 | { 120 | "index": "4", 121 | "name": "", 122 | "value": "0" 123 | }, 124 | { 125 | "index": "3", 126 | "name": "", 127 | "value": "0" 128 | }, 129 | { 130 | "index": "2", 131 | "name": "", 132 | "value": "0" 133 | }, 134 | { 135 | "index": "1", 136 | "name": "", 137 | "value": "0" 138 | }, 139 | { 140 | "index": "0", 141 | "name": "", 142 | "value": "0" 143 | } 144 | ], 145 | "virtual": true 146 | }, 147 | "position": { 148 | "x": 976, 149 | "y": 304 150 | } 151 | } 152 | ], 153 | "wires": [ 154 | { 155 | "source": { 156 | "block": "9666115a-aff5-4be6-ab10-caf2d924bc47", 157 | "port": "constant-out" 158 | }, 159 | "target": { 160 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 161 | "port": "Random_Sum" 162 | } 163 | }, 164 | { 165 | "source": { 166 | "block": "1131d05a-0312-427c-98bb-72230e09415a", 167 | "port": "out" 168 | }, 169 | "target": { 170 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 171 | "port": "clk" 172 | } 173 | }, 174 | { 175 | "source": { 176 | "block": "00eb7935-02c1-4e71-9301-17113d267883", 177 | "port": "constant-out" 178 | }, 179 | "target": { 180 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 181 | "port": "Initial_Value" 182 | } 183 | }, 184 | { 185 | "source": { 186 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 187 | "port": "num" 188 | }, 189 | "target": { 190 | "block": "5fb6f12d-a5de-4213-ad10-27f884c65287", 191 | "port": "in" 192 | }, 193 | "size": 8 194 | } 195 | ] 196 | }, 197 | "state": { 198 | "pan": { 199 | "x": -4, 200 | "y": 3 201 | }, 202 | "zoom": 1 203 | } 204 | }, 205 | "dependencies": {} 206 | } -------------------------------------------------------------------------------- /icestick/Otros/Ejemplos/1_led_on.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Led on", 5 | "version": "1.0.0", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "eaf792b5-de98-4e2f-b78a-4023eb9a7f2b", 16 | "type": "3e6c249e205080168c1bf4ee8dbc33b50653d5f4", 17 | "position": { 18 | "x": 80, 19 | "y": 64 20 | }, 21 | "size": { 22 | "width": 96, 23 | "height": 64 24 | } 25 | }, 26 | { 27 | "id": "949075cb-26c0-49da-ba76-2496ea9aa7cc", 28 | "type": "basic.output", 29 | "data": { 30 | "name": "led", 31 | "pins": [ 32 | { 33 | "index": "0", 34 | "name": "D2", 35 | "value": "98" 36 | } 37 | ], 38 | "virtual": false 39 | }, 40 | "position": { 41 | "x": 352, 42 | "y": 64 43 | } 44 | }, 45 | { 46 | "id": "a538a5b4-d5d5-4ace-a593-efb1fa9b930c", 47 | "type": "basic.info", 48 | "data": { 49 | "info": "LED-ON Hello world circuit example!\n\nThe simplest digital circuit that turns a \nled on\n\nA bit set to 1 is wired directly to the\noutput FPGA pin, where the led is connected\n\nThe blue box is the bit (set to 1)\nIt is inside the FPGA\n\nThe yellow box is the output FPGA pin. Using\nthe bottom menu the pin can be changed\n\nEXERCISE 1: Upload this circuit into your \nFPGA board and watch the led. \nIt should be turned on\n\nEXERCISE 2: Change the pin number to turn\nanother led on and upload it again" 50 | }, 51 | "position": { 52 | "x": 40, 53 | "y": 208 54 | }, 55 | "size": { 56 | "width": 400, 57 | "height": 256 58 | } 59 | }, 60 | { 61 | "id": "0d05784e-8e32-4c80-b85d-cde4e892dbf3", 62 | "type": "basic.info", 63 | "data": { 64 | "info": "Ejemplo de circuito Hola mundo: LED-ON\n\nEs el circuito digital más sencillo que\nenciende un led\n\nUn bit a 1 se cablea directamente a una\nsalida de la FPGA, donde está conectado\nel LED\n\nLa caja azul es el bit a 1\nEstá dentro de la FPGA\n\nLa caja amarilla es el pin de salida de\nla FPGA. Por medio del menú desplegable\ninferior se puede cambiar el pin\n\nEJERCICIO 1: Carga este circuito en la FPGA\ny observa el LED0. Debe estar encendido\n\nEJERCICIO 2: Cambia el pin de salida para\nencender otro led (por ejemplo el LED1)\ny cárgalo en la FPGA de nuevo" 65 | }, 66 | "position": { 67 | "x": 464, 68 | "y": 208 69 | }, 70 | "size": { 71 | "width": 400, 72 | "height": 256 73 | } 74 | } 75 | ], 76 | "wires": [ 77 | { 78 | "source": { 79 | "block": "eaf792b5-de98-4e2f-b78a-4023eb9a7f2b", 80 | "port": "19c8f68d-5022-487f-9ab0-f0a3cd58bead" 81 | }, 82 | "target": { 83 | "block": "949075cb-26c0-49da-ba76-2496ea9aa7cc", 84 | "port": "in" 85 | } 86 | } 87 | ] 88 | }, 89 | "state": { 90 | "pan": { 91 | "x": 0, 92 | "y": 0 93 | }, 94 | "zoom": 1 95 | } 96 | }, 97 | "dependencies": { 98 | "3e6c249e205080168c1bf4ee8dbc33b50653d5f4": { 99 | "package": { 100 | "name": "Bit 1", 101 | "version": "1.0.0", 102 | "description": "Assign 1 to the output wire", 103 | "author": "Jesús Arroyo", 104 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2247.303%22%20height=%2227.648%22%20viewBox=%220%200%2044.346456%2025.919999%22%3E%3Ctext%20style=%22line-height:125%25%22%20x=%22325.218%22%20y=%22315.455%22%20font-weight=%22400%22%20font-size=%2212.669%22%20font-family=%22sans-serif%22%20letter-spacing=%220%22%20word-spacing=%220%22%20transform=%22translate(-307.01%20-298.51)%22%3E%3Ctspan%20x=%22325.218%22%20y=%22315.455%22%20style=%22-inkscape-font-specification:'Courier%2010%20Pitch'%22%20font-family=%22Courier%2010%20Pitch%22%3E1%3C/tspan%3E%3C/text%3E%3C/svg%3E" 105 | }, 106 | "design": { 107 | "graph": { 108 | "blocks": [ 109 | { 110 | "id": "b959fb96-ac67-4aea-90b3-ed35a4c17bf5", 111 | "type": "basic.code", 112 | "data": { 113 | "code": "// Bit 1\n\nassign v = 1'b1;", 114 | "params": [], 115 | "ports": { 116 | "in": [], 117 | "out": [ 118 | { 119 | "name": "v" 120 | } 121 | ] 122 | } 123 | }, 124 | "position": { 125 | "x": 96, 126 | "y": 96 127 | } 128 | }, 129 | { 130 | "id": "19c8f68d-5022-487f-9ab0-f0a3cd58bead", 131 | "type": "basic.output", 132 | "data": { 133 | "name": "" 134 | }, 135 | "position": { 136 | "x": 608, 137 | "y": 192 138 | } 139 | } 140 | ], 141 | "wires": [ 142 | { 143 | "source": { 144 | "block": "b959fb96-ac67-4aea-90b3-ed35a4c17bf5", 145 | "port": "v" 146 | }, 147 | "target": { 148 | "block": "19c8f68d-5022-487f-9ab0-f0a3cd58bead", 149 | "port": "in" 150 | } 151 | } 152 | ] 153 | }, 154 | "state": { 155 | "pan": { 156 | "x": 0, 157 | "y": 0 158 | }, 159 | "zoom": 1 160 | } 161 | } 162 | } 163 | } 164 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/TriState01.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "TriState", 5 | "version": "v1.0", 6 | "description": "TriState Gate", 7 | "author": "José Picó", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22374%22%20height=%22171%22%20viewBox=%220%200%20374%20171%22%3E%3Cimage%20width=%22374%22%20height=%22171%22%20preserveAspectRatio=%22none%22%20xlink:href=%22data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXYAAACrCAYAAAByibcgAAAABHNCSVQICAgIfAhkiAAABUtJREFU%20eJzt3cu2mkgAhlFOlgPe/2kduE560J2EJsjNAqp+9h4l3mCJfJQler5e36+fHQAxfly9AgCUJewA%20YYQdIIywA4QRdoAwwg4QRtgBwgg7QBhhBwgj7ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAmMfVKwAl%209I/+97+fr+em26+9D7RC2ClqHMyxowL6fD0Xlz21HlvuA60QdooaBnYccRGFcwg7lxhPnSxNpUwd%20FOZG/1unZtY8TonHgzN8+WPWlDYesfePfjHW46mRpXhO3W7P481dP7cMcadmzorhMP2jXzX9UjqS%20w8fbO5f+LuDm5mmBqRgOUzKCV4VUwGmRsHO4pSmZJUvTLkcy5UKLTMXQnKWoD6/fOyc+925j7RQT%20XMWHpxS19jz2qS8IzX1paOksmi1n2Ww51/7dbY3kqZmwA4QxFQMQRtgBwgg7QBhhBwgj7ABhhB0g%20jLADhBF2gDDCDhBG2AHCCDtN82Nc8DdhBwgj7ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAGGEHCCPs%20AGGEHSCMsAOEEXaAMMIOEEbYAcIIO0AYYQcII+wAYYQdIIywA4QRdoAwwg4QRtgBwgg7QBhhBwgj%207ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAGGEHCCPsAGGEHSCMsAOEEXaAMMIOEEbYAcIIO0AYYQcI%20I+wAYYSdTfpH3/WP/urVAGYIO5s9X0+Bh4o9rl4B2vR8Pbuu637H/df/gesJOx8ReKiPsFOEwEM9%20hJ2iBB6uJ+wcQuDhOsLOoQQezifsnELg4TzCzqkEHo4n7FxC4OE4ws6lBB7KE3aqMA788DJgG2Gn%20KsOYG8XDPsJOtUzTwD7CTvUEHrYRdpoh8LCOsNOcqQ9agT+EnWYZwcM0Yad5Ag//J+zEEHj4l7AT%20R+C5O2EnlsBzV8JOPD9XwN0IO7fh5wq4C2HnlkzTkEzYuTWBJ5GwQyfwZBF2GBB4Egg7TBB4uu66%207f/pcoUdZgh8W6Z+GO6O26z5sNvhOIPA129q2/SPvusf/e2219fr+/Xz3ZVLP4taw5NlRzvXHXeS%20KV53dZnbHsPrpr6ktnTZ2NT3IeYef80yti53yeyI3Rc6YJoRfJvG8Z27rOuWt+/wvsNBz/idQunl%20Lvl4KmbvEav0kc3XxbmCwPPLcNv/atxV73A/DvueI1ZNRzYowV91Opb9e5uiH56uffJrObLZCSnJ%20IINaNH9WzCfsgNs5GP5N0K/3boC4ZttsfU2/G4SOZyLOWu6UW4cdPiHodRnGfXz53O3eTRO/e8w1%20H6Seudwpl4S9piMb7OE1Vqc908FL99uynZdue9Ryxz4+j33vB51LR6K1Z9FMracd7jh3D5pROmM1%20viZmw15ajU8A29w17F67TKn1JwzMscMMQWdOra+L08I+PLLZWWjBXd+d0L7Twm4HoRUGHrTOVAz8%20R9BJIezQmXYhi7Bza0bpJBJ2bknQSSbs3IqgcwfCzm2YR+cuhJ14RuncjbATS9C5K2EnjqBzd8JO%20FPPoIOyEMEqHP4Sdpgk6/E3YaZKgw3vCTnPMo8M8YacZRumwjrBTPUGHbYSdagk67CPsVMk8Ouwn%207FTFKB0+J+xUQdChHGHnUoIO5Qk7lzGPDscQdk5nlA7HEnZOI+hwDmHnFKZd4DzCzqGM0uF8ws4h%20BB2uI+wUJehwPWGnGPPoUAdh52NG6VAXYWc3QYc6CTubCTrUTdjZTNChbl+v79fPq1cCgHJ+XL0C%20AJQl7ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAGGEHCCPsAGGEHSDMPxj5ImreX/7MAAAAAElFTkSu%20QmCC%22/%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "f977b675-5a43-4e17-9385-9579db0f3301", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "In", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "", 23 | "value": "0" 24 | } 25 | ], 26 | "virtual": true, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 368, 31 | "y": 216 32 | } 33 | }, 34 | { 35 | "id": "aed97f5e-976b-4315-ac73-5f38afa2752f", 36 | "type": "basic.code", 37 | "data": { 38 | "code": "\nassign OUT=(EN)? IN:1'bz;", 39 | "params": [], 40 | "ports": { 41 | "in": [ 42 | { 43 | "name": "IN" 44 | }, 45 | { 46 | "name": "EN" 47 | } 48 | ], 49 | "out": [ 50 | { 51 | "name": "OUT" 52 | } 53 | ] 54 | } 55 | }, 56 | "position": { 57 | "x": 568, 58 | "y": 224 59 | }, 60 | "size": { 61 | "width": 336, 62 | "height": 80 63 | } 64 | }, 65 | { 66 | "id": "da53b263-b29f-4c41-859d-fca08b80c03d", 67 | "type": "basic.output", 68 | "data": { 69 | "name": "Out", 70 | "pins": [ 71 | { 72 | "index": "0", 73 | "name": "", 74 | "value": "0" 75 | } 76 | ], 77 | "virtual": true 78 | }, 79 | "position": { 80 | "x": 984, 81 | "y": 232 82 | } 83 | }, 84 | { 85 | "id": "5474681d-697b-4a1d-828c-7429921790e7", 86 | "type": "basic.input", 87 | "data": { 88 | "name": "EN", 89 | "pins": [ 90 | { 91 | "index": "0", 92 | "name": "", 93 | "value": "0" 94 | } 95 | ], 96 | "virtual": true, 97 | "clock": false 98 | }, 99 | "position": { 100 | "x": 600, 101 | "y": 344 102 | } 103 | } 104 | ], 105 | "wires": [ 106 | { 107 | "source": { 108 | "block": "5474681d-697b-4a1d-828c-7429921790e7", 109 | "port": "out" 110 | }, 111 | "target": { 112 | "block": "aed97f5e-976b-4315-ac73-5f38afa2752f", 113 | "port": "EN" 114 | } 115 | }, 116 | { 117 | "source": { 118 | "block": "aed97f5e-976b-4315-ac73-5f38afa2752f", 119 | "port": "OUT" 120 | }, 121 | "target": { 122 | "block": "da53b263-b29f-4c41-859d-fca08b80c03d", 123 | "port": "in" 124 | } 125 | }, 126 | { 127 | "source": { 128 | "block": "f977b675-5a43-4e17-9385-9579db0f3301", 129 | "port": "out" 130 | }, 131 | "target": { 132 | "block": "aed97f5e-976b-4315-ac73-5f38afa2752f", 133 | "port": "IN" 134 | } 135 | } 136 | ] 137 | }, 138 | "state": { 139 | "pan": { 140 | "x": 107.9722, 141 | "y": 83.7118 142 | }, 143 | "zoom": 0.9204 144 | } 145 | }, 146 | "dependencies": {} 147 | } -------------------------------------------------------------------------------- /icestick/Otros/imagenes SVG/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 54 | 115 | 116 | -------------------------------------------------------------------------------- /icestick/Otros/Modulos/TriStatePrimitive.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "TriState Primitive", 5 | "version": "v1.0", 6 | "description": "TriState Primitive", 7 | "author": "José Picó", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22374%22%20height=%22171%22%20viewBox=%220%200%20374%20171%22%3E%3Cimage%20width=%22374%22%20height=%22171%22%20preserveAspectRatio=%22none%22%20xlink:href=%22data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXYAAACrCAYAAAByibcgAAAABHNCSVQICAgIfAhkiAAABUtJREFU%20eJzt3cu2mkgAhlFOlgPe/2kduE560J2EJsjNAqp+9h4l3mCJfJQler5e36+fHQAxfly9AgCUJewA%20YYQdIIywA4QRdoAwwg4QRtgBwgg7QBhhBwgj7ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAmMfVKwAl%209I/+97+fr+em26+9D7RC2ClqHMyxowL6fD0Xlz21HlvuA60QdooaBnYccRGFcwg7lxhPnSxNpUwd%20FOZG/1unZtY8TonHgzN8+WPWlDYesfePfjHW46mRpXhO3W7P481dP7cMcadmzorhMP2jXzX9UjqS%20w8fbO5f+LuDm5mmBqRgOUzKCV4VUwGmRsHO4pSmZJUvTLkcy5UKLTMXQnKWoD6/fOyc+925j7RQT%20XMWHpxS19jz2qS8IzX1paOksmi1n2Ww51/7dbY3kqZmwA4QxFQMQRtgBwgg7QBhhBwgj7ABhhB0g%20jLADhBF2gDDCDhBG2AHCCDtN82Nc8DdhBwgj7ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAGGEHCCPs%20AGGEHSCMsAOEEXaAMMIOEEbYAcIIO0AYYQcII+wAYYQdIIywA4QRdoAwwg4QRtgBwgg7QBhhBwgj%207ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAGGEHCCPsAGGEHSCMsAOEEXaAMMIOEEbYAcIIO0AYYQcI%20I+wAYYSdTfpH3/WP/urVAGYIO5s9X0+Bh4o9rl4B2vR8Pbuu637H/df/gesJOx8ReKiPsFOEwEM9%20hJ2iBB6uJ+wcQuDhOsLOoQQezifsnELg4TzCzqkEHo4n7FxC4OE4ws6lBB7KE3aqMA788DJgG2Gn%20KsOYG8XDPsJOtUzTwD7CTvUEHrYRdpoh8LCOsNOcqQ9agT+EnWYZwcM0Yad5Ag//J+zEEHj4l7AT%20R+C5O2EnlsBzV8JOPD9XwN0IO7fh5wq4C2HnlkzTkEzYuTWBJ5GwQyfwZBF2GBB4Egg7TBB4uu66%207f/pcoUdZgh8W6Z+GO6O26z5sNvhOIPA129q2/SPvusf/e2219fr+/Xz3ZVLP4taw5NlRzvXHXeS%20KV53dZnbHsPrpr6ktnTZ2NT3IeYef80yti53yeyI3Rc6YJoRfJvG8Z27rOuWt+/wvsNBz/idQunl%20Lvl4KmbvEav0kc3XxbmCwPPLcNv/atxV73A/DvueI1ZNRzYowV91Opb9e5uiH56uffJrObLZCSnJ%20IINaNH9WzCfsgNs5GP5N0K/3boC4ZttsfU2/G4SOZyLOWu6UW4cdPiHodRnGfXz53O3eTRO/e8w1%20H6Seudwpl4S9piMb7OE1Vqc908FL99uynZdue9Ryxz4+j33vB51LR6K1Z9FMracd7jh3D5pROmM1%20viZmw15ajU8A29w17F67TKn1JwzMscMMQWdOra+L08I+PLLZWWjBXd+d0L7Twm4HoRUGHrTOVAz8%20R9BJIezQmXYhi7Bza0bpJBJ2bknQSSbs3IqgcwfCzm2YR+cuhJ14RuncjbATS9C5K2EnjqBzd8JO%20FPPoIOyEMEqHP4Sdpgk6/E3YaZKgw3vCTnPMo8M8YacZRumwjrBTPUGHbYSdagk67CPsVMk8Ouwn%207FTFKB0+J+xUQdChHGHnUoIO5Qk7lzGPDscQdk5nlA7HEnZOI+hwDmHnFKZd4DzCzqGM0uF8ws4h%20BB2uI+wUJehwPWGnGPPoUAdh52NG6VAXYWc3QYc6CTubCTrUTdjZTNChbl+v79fPq1cCgHJ+XL0C%20AJQl7ABhhB0gjLADhBF2gDDCDhBG2AHCCDtAGGEHCCPsAGGEHSDMPxj5ImreX/7MAAAAAElFTkSu%20QmCC%22/%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "ea5b8ff1-80a8-47d3-9fb3-0fa7308887c3", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "In", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "", 23 | "value": "0" 24 | } 25 | ], 26 | "virtual": true, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 280, 31 | "y": 144 32 | } 33 | }, 34 | { 35 | "id": "90e70c0b-9f56-4789-bc36-9aa8122ce52c", 36 | "type": "basic.code", 37 | "data": { 38 | "code": "\nbufif1 buffer1(Out,In,Enable);", 39 | "params": [], 40 | "ports": { 41 | "in": [ 42 | { 43 | "name": "In" 44 | }, 45 | { 46 | "name": "Enable" 47 | } 48 | ], 49 | "out": [ 50 | { 51 | "name": "Out" 52 | } 53 | ] 54 | } 55 | }, 56 | "position": { 57 | "x": 480, 58 | "y": 184 59 | }, 60 | "size": { 61 | "width": 368, 62 | "height": 80 63 | } 64 | }, 65 | { 66 | "id": "019473e4-7e83-4203-ae69-b77e8a4aab5e", 67 | "type": "basic.output", 68 | "data": { 69 | "name": "Out", 70 | "pins": [ 71 | { 72 | "index": "0", 73 | "name": "", 74 | "value": "0" 75 | } 76 | ], 77 | "virtual": true 78 | }, 79 | "position": { 80 | "x": 944, 81 | "y": 192 82 | } 83 | }, 84 | { 85 | "id": "ff4b7f76-30ef-4301-8119-79028b2a8d72", 86 | "type": "basic.input", 87 | "data": { 88 | "name": "Enable", 89 | "pins": [ 90 | { 91 | "index": "0", 92 | "name": "", 93 | "value": "0" 94 | } 95 | ], 96 | "virtual": true, 97 | "clock": false 98 | }, 99 | "position": { 100 | "x": 280, 101 | "y": 240 102 | } 103 | } 104 | ], 105 | "wires": [ 106 | { 107 | "source": { 108 | "block": "ea5b8ff1-80a8-47d3-9fb3-0fa7308887c3", 109 | "port": "out" 110 | }, 111 | "target": { 112 | "block": "90e70c0b-9f56-4789-bc36-9aa8122ce52c", 113 | "port": "In" 114 | } 115 | }, 116 | { 117 | "source": { 118 | "block": "ff4b7f76-30ef-4301-8119-79028b2a8d72", 119 | "port": "out" 120 | }, 121 | "target": { 122 | "block": "90e70c0b-9f56-4789-bc36-9aa8122ce52c", 123 | "port": "Enable" 124 | } 125 | }, 126 | { 127 | "source": { 128 | "block": "90e70c0b-9f56-4789-bc36-9aa8122ce52c", 129 | "port": "Out" 130 | }, 131 | "target": { 132 | "block": "019473e4-7e83-4203-ae69-b77e8a4aab5e", 133 | "port": "in" 134 | } 135 | } 136 | ] 137 | }, 138 | "state": { 139 | "pan": { 140 | "x": 0, 141 | "y": 0 142 | }, 143 | "zoom": 1 144 | } 145 | }, 146 | "dependencies": {} 147 | } -------------------------------------------------------------------------------- /alhambraII/svg/3-Input_AND_ANSI.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 28 | 35 | 42 | 49 | 56 | 63 | 64 | 85 | 99 | 100 | 102 | 103 | 105 | image/svg+xml 106 | 108 | 109 | 110 | 111 | 115 | 120 | 124 | 128 | 133 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /icestick/Otros/Modulos/PseudoRandomNumber16.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Pseudo Random", 5 | "version": "1.0", 6 | "description": "Generate a Pseudo Random number of 16 bits", 7 | "author": "José Picó", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "9666115a-aff5-4be6-ab10-caf2d924bc47", 16 | "type": "basic.constant", 17 | "data": { 18 | "name": "Random_Sum", 19 | "value": "", 20 | "local": false 21 | }, 22 | "position": { 23 | "x": 576, 24 | "y": 88 25 | } 26 | }, 27 | { 28 | "id": "94078c1a-e2de-4647-9a09-d980a81fff9b", 29 | "type": "basic.code", 30 | "data": { 31 | "code": "\n// To generate pseudoaleatory numbers\n// each posedge clock ,output number changes\n// pseudo-Randomly in function of Random_Sum\n// parameter\n\nreg[15:0] num=0;\n\nlocalparam x = Random_Sum;\n\nalways @(posedge clk)\n num <= num + x;", 32 | "params": [ 33 | { 34 | "name": "Random_Sum" 35 | } 36 | ], 37 | "ports": { 38 | "in": [ 39 | { 40 | "name": "clk" 41 | } 42 | ], 43 | "out": [ 44 | { 45 | "name": "num", 46 | "range": "[15:0]", 47 | "size": 16 48 | } 49 | ] 50 | } 51 | }, 52 | "position": { 53 | "x": 376, 54 | "y": 200 55 | }, 56 | "size": { 57 | "width": 496, 58 | "height": 272 59 | } 60 | }, 61 | { 62 | "id": "1131d05a-0312-427c-98bb-72230e09415a", 63 | "type": "basic.input", 64 | "data": { 65 | "name": "clk", 66 | "pins": [ 67 | { 68 | "index": "0", 69 | "name": "", 70 | "value": "0" 71 | } 72 | ], 73 | "virtual": true, 74 | "clock": false 75 | }, 76 | "position": { 77 | "x": 184, 78 | "y": 304 79 | } 80 | }, 81 | { 82 | "id": "7f98d7d3-1dea-4411-8679-9397c8401927", 83 | "type": "basic.output", 84 | "data": { 85 | "name": "Num", 86 | "range": "[15:0]", 87 | "pins": [ 88 | { 89 | "index": "15", 90 | "name": "", 91 | "value": "0" 92 | }, 93 | { 94 | "index": "14", 95 | "name": "", 96 | "value": "0" 97 | }, 98 | { 99 | "index": "13", 100 | "name": "", 101 | "value": "0" 102 | }, 103 | { 104 | "index": "12", 105 | "name": "", 106 | "value": "0" 107 | }, 108 | { 109 | "index": "11", 110 | "name": "", 111 | "value": "0" 112 | }, 113 | { 114 | "index": "10", 115 | "name": "", 116 | "value": "0" 117 | }, 118 | { 119 | "index": "9", 120 | "name": "", 121 | "value": "0" 122 | }, 123 | { 124 | "index": "8", 125 | "name": "", 126 | "value": "0" 127 | }, 128 | { 129 | "index": "7", 130 | "name": "", 131 | "value": "0" 132 | }, 133 | { 134 | "index": "6", 135 | "name": "", 136 | "value": "0" 137 | }, 138 | { 139 | "index": "5", 140 | "name": "", 141 | "value": "0" 142 | }, 143 | { 144 | "index": "4", 145 | "name": "", 146 | "value": "0" 147 | }, 148 | { 149 | "index": "3", 150 | "name": "", 151 | "value": "0" 152 | }, 153 | { 154 | "index": "2", 155 | "name": "", 156 | "value": "0" 157 | }, 158 | { 159 | "index": "1", 160 | "name": "", 161 | "value": "0" 162 | }, 163 | { 164 | "index": "0", 165 | "name": "", 166 | "value": "0" 167 | } 168 | ], 169 | "virtual": true 170 | }, 171 | "position": { 172 | "x": 976, 173 | "y": 304 174 | } 175 | } 176 | ], 177 | "wires": [ 178 | { 179 | "source": { 180 | "block": "9666115a-aff5-4be6-ab10-caf2d924bc47", 181 | "port": "constant-out" 182 | }, 183 | "target": { 184 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 185 | "port": "Random_Sum" 186 | } 187 | }, 188 | { 189 | "source": { 190 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 191 | "port": "num" 192 | }, 193 | "target": { 194 | "block": "7f98d7d3-1dea-4411-8679-9397c8401927", 195 | "port": "in" 196 | }, 197 | "size": 16 198 | }, 199 | { 200 | "source": { 201 | "block": "1131d05a-0312-427c-98bb-72230e09415a", 202 | "port": "out" 203 | }, 204 | "target": { 205 | "block": "94078c1a-e2de-4647-9a09-d980a81fff9b", 206 | "port": "clk" 207 | } 208 | } 209 | ] 210 | }, 211 | "state": { 212 | "pan": { 213 | "x": -4, 214 | "y": 3 215 | }, 216 | "zoom": 1 217 | } 218 | }, 219 | "dependencies": {} 220 | } -------------------------------------------------------------------------------- /icestick/Otros/Ejemplos/PullUp.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "", 5 | "version": "", 6 | "description": "", 7 | "author": "", 8 | "image": "" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "843319ae-438f-48ec-a3af-b1a73602f0e6", 16 | "type": "basic.input", 17 | "data": { 18 | "name": "in", 19 | "pins": [ 20 | { 21 | "index": "0", 22 | "name": "PMOD1", 23 | "value": "78" 24 | } 25 | ], 26 | "virtual": false, 27 | "clock": false 28 | }, 29 | "position": { 30 | "x": 488, 31 | "y": 184 32 | } 33 | }, 34 | { 35 | "id": "d75e9d8c-86fe-4e3c-b551-eeb7179372cc", 36 | "type": "15f5837088c5f8f4ecde32c7c244266a909c098f", 37 | "position": { 38 | "x": 680, 39 | "y": 184 40 | }, 41 | "size": { 42 | "width": 96, 43 | "height": 64 44 | } 45 | }, 46 | { 47 | "id": "00a362a0-16e7-4cb5-b1cb-7717fc8ce756", 48 | "type": "basic.output", 49 | "data": { 50 | "name": "out", 51 | "pins": [ 52 | { 53 | "index": "0", 54 | "name": "D5", 55 | "value": "95" 56 | } 57 | ], 58 | "virtual": false 59 | }, 60 | "position": { 61 | "x": 896, 62 | "y": 184 63 | } 64 | } 65 | ], 66 | "wires": [ 67 | { 68 | "source": { 69 | "block": "843319ae-438f-48ec-a3af-b1a73602f0e6", 70 | "port": "out" 71 | }, 72 | "target": { 73 | "block": "d75e9d8c-86fe-4e3c-b551-eeb7179372cc", 74 | "port": "bb4a1ca9-1b30-471e-92ca-ca7ff2fc1150" 75 | } 76 | }, 77 | { 78 | "source": { 79 | "block": "d75e9d8c-86fe-4e3c-b551-eeb7179372cc", 80 | "port": "a139fa0d-9b45-4480-a251-f4a66b49aa23" 81 | }, 82 | "target": { 83 | "block": "00a362a0-16e7-4cb5-b1cb-7717fc8ce756", 84 | "port": "in" 85 | } 86 | } 87 | ] 88 | }, 89 | "state": { 90 | "pan": { 91 | "x": 0, 92 | "y": -1 93 | }, 94 | "zoom": 1 95 | } 96 | }, 97 | "dependencies": { 98 | "15f5837088c5f8f4ecde32c7c244266a909c098f": { 99 | "package": { 100 | "name": "Pull up", 101 | "version": "1.0.0", 102 | "description": "FPGA internal pull up configuration on the connected input port", 103 | "author": "Juan González", 104 | "image": "%3Csvg%20id=%22svg2%22%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%22-265%20401.5%2063.5%2038.4%22%3E%3Cstyle%3E.st0%7Bdisplay:none%7D.st1%7Bfill:none;stroke:#000;stroke-width:.75;stroke-linejoin:round;stroke-miterlimit:10%7D.st2%7Bfill:#010002%7D%3C/style%3E%3Cpath%20class=%22st0%22%20d=%22M-242.5%20411.8v11.8h-5.4v-11.8h5.4m1-1h-7.4v13.8h7.4v-13.8z%22/%3E%3Cpath%20d=%22M-212%20425.6l-15.4-8.7v8.5h-17.4v-2.7c0-.2-.1-.4-.3-.4l-2.3-1.2%205.6-2.9c.2-.1.3-.3.3-.5s-.1-.4-.3-.4l-5.7-2.7%202.4-1.6c.1-.1.2-.2.2-.4v-2.7h3.1l-3.5-6.1-3.5%206.1h3v2.5l-2.9%202c-.1.1-.2.3-.2.5s.1.3.3.4l5.6%202.6-5.6%202.9c-.2.1-.3.3-.3.4s.1.4.3.4l2.9%201.5V425.5H-265v1.2h37.6v8.5l15.4-8.7h10.5v-.8H-212zm-33.3-20.4l2.2%203.9h-4.5l2.3-3.9zm19.2%2027.7v-13.8l12.3%206.9-12.3%206.9z%22/%3E%3C/svg%3E" 105 | }, 106 | "design": { 107 | "config": "true", 108 | "pullup": "true", 109 | "graph": { 110 | "blocks": [ 111 | { 112 | "id": "2b245a71-2d80-466b-955f-e3d61839fe25", 113 | "type": "basic.code", 114 | "data": { 115 | "code": "// Pull up\n\nwire din, dout, outen;\n\nassign o = din;\n\nSB_IO #(\n .PIN_TYPE(6'b 1010_01),\n .PULLUP(1'b 1)\n) io_pin (\n .PACKAGE_PIN(i),\n .OUTPUT_ENABLE(outen),\n .D_OUT_0(dout),\n .D_IN_0(din)\n);", 116 | "params": [], 117 | "ports": { 118 | "in": [ 119 | { 120 | "name": "i" 121 | } 122 | ], 123 | "out": [ 124 | { 125 | "name": "o" 126 | } 127 | ] 128 | } 129 | }, 130 | "position": { 131 | "x": 256, 132 | "y": 104 133 | } 134 | }, 135 | { 136 | "id": "bb4a1ca9-1b30-471e-92ca-ca7ff2fc1150", 137 | "type": "basic.input", 138 | "data": { 139 | "name": "" 140 | }, 141 | "position": { 142 | "x": 64, 143 | "y": 200 144 | } 145 | }, 146 | { 147 | "id": "a139fa0d-9b45-4480-a251-f4a66b49aa23", 148 | "type": "basic.output", 149 | "data": { 150 | "name": "" 151 | }, 152 | "position": { 153 | "x": 760, 154 | "y": 200 155 | } 156 | } 157 | ], 158 | "wires": [ 159 | { 160 | "source": { 161 | "block": "bb4a1ca9-1b30-471e-92ca-ca7ff2fc1150", 162 | "port": "out" 163 | }, 164 | "target": { 165 | "block": "2b245a71-2d80-466b-955f-e3d61839fe25", 166 | "port": "i" 167 | } 168 | }, 169 | { 170 | "source": { 171 | "block": "2b245a71-2d80-466b-955f-e3d61839fe25", 172 | "port": "o" 173 | }, 174 | "target": { 175 | "block": "a139fa0d-9b45-4480-a251-f4a66b49aa23", 176 | "port": "in" 177 | } 178 | } 179 | ] 180 | }, 181 | "state": { 182 | "pan": { 183 | "x": 0, 184 | "y": 0 185 | }, 186 | "zoom": 1 187 | } 188 | } 189 | } 190 | } 191 | } -------------------------------------------------------------------------------- /icestick/Otros/Modulos/buffer.ice: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "package": { 4 | "name": "Buffer", 5 | "version": "v1.0", 6 | "description": "Buffer", 7 | "author": "José Picó", 8 | "image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20width=%22375.938%22%20height=%22174.375%22%20viewBox=%220%200%20375.9375%20174.375%22%3E%3Cimage%20width=%22375.938%22%20height=%22174.375%22%20preserveAspectRatio=%22none%22%20xlink:href=%22data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZEAAAC6CAIAAADgX+dBAAAAAXNSR0IArs4c6QAAAARnQU1BAACx%20jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAkHSURBVHhe7dThbttKDETh+/4v3Qu0h0CKZBo7%20tka70vn+hRnb0i7J/35J0j7cWZJ24s4q+W/wt6QfcYQaWFcf8A9JT3J4GlhUn/BvSQ9zbBpYUQEh%20SQ9wYBpYTv9EVNI/OSoNrKUH8AFJgUPSwEJ6GB+T9Inj0cAqGl8WP/sTk/SRg9HAEhpUf6OUkZP0%20myPRwPoZVD/gHwEhSe6sDnbPoPo3/peRk+7NSWhg6wyqXyGRkZPuyhloYN8Mqhm5jJx0P3Z/A5tm%20UP0O6YycdCf2fQM7ZlB9DJ/JyEn3YMc3sF0G1WfwyYycdHX2egN7ZVB9Hp/PyEnXZZc3sFEG1Z/i%20WzJy0hXZ3w3skkH1NXxXRk66Fju7gS0yqL4D35iRk67Cnm5gfwyq78P3ZuSk/dnNDWyOQfXd+PaM%20nLQz+7iBnTGoHoPfyMhJe7KDG9gWg+qR+KWMnLQbe7eBPTGoHo/fy8hJ+7BrG9gQg2oLvxoQkjZh%20yzawHgbVIn44Iyctz2ZtYDEMqnX8fEZOWpht2sBKGFRPwkNk5KQl2aANLINB9VQ8SkZOWoyt2cAa%20GFQXwANl5KRl2JQNLIBBdRk8VkZOWoDt2MDoD6qL4eEyctKpbMQGhn5QXRKPmJGTTmILNjDug+rC%20eNCMnFRn8zUw6IPq8njcjJxUZNs1MOKD6iZ46IycVGHDNTDcg+pWePSMnHQwW62BsR5UN8QLZOSk%20w9hkDQz0oLotXiMjJx3A9mpglAfVzfEyGTnprWysBoZ4UL0EXikgJL2PXdXABA+qF8KLBYSkd7Cf%20GpjdQfVaeLeMnPQaO6mBqR1Ur4g3zMhJP2UPNTCvg+p18Z4ZOel5dk8DkzqoXh1vm5GTnmHfNDCj%20g+o98M4ZOekxdkwD0zmo3glvnpGTvmOvNDCXg+r98P4ZOSmzSxqYyEH1rjiFjJz0FfujgVkcVO+N%20s8jISX+zMxqYwkFVbi49z55oYP4GVQ3OJSMnubM6mLxBVX/jdDJyujf7oIGZG1T1Fc4oI6e7sgMa%20mLZBVRknlZHT/Xj3DczZoKrvcF4ZOd2Jt97AhA2qegynFhDSbXjlDYzXoKqHcXAZOd2Al93AYA2q%20ehLHl5HTpXnNDYzUoKof4RAzcrooL7iBYRpU9QKOMiOny/FqGxijQVUv40AzcroQL7WBARpU9SYc%20a0ZOl+B1NjA6g6reisPNyGlzXmQDQzOo6gAccUZO2/IKGxiXQVWH4aAzctqQl9fAoAyqOhjHnZHT%20Vry2BkZkUFUFh56R0ya8sAaGY1BVEUefkdPyvKoGxmJQVR0XkJHTwrykBgZiUNVJuIaMnJbk9TQw%20CoOqTsVlZOS0GC+mgSEYVLUAriQgpJV4Kw1MwKCqNXArGTmtwftooPcHVa2Eu8nI6WzeRANdP6hq%20PdxQRk7n8Q4a6PdBVavinjJyOoOn30CnD6paG7eVkVOX595Ajw+q2gF3lpFTiyfeQHcPqtoHN5eR%200/HiWXMVOgBHrN1wfxk5HcmddQKOWHviFtXCuQ931gk4Yu2Mu9TxOPHh/DRw9oOq9sQtqoVzH85P%20A2c/qGo33F9GTkfylBvo6EFV++DmMnI6nmfdQF8PqtoBd5aRU4sn3kB3D6paG7eVkVOX595Ajw+q%20WhX3lJHTGTz9Bjp9UNV6uKGMnM7jHTTQ74OqFsP1BIR0Nm+iga4fVLUMLiYjpwV4GQ00/qCqBXAl%20GTktwytpoP0HVZ2Ky8jIaTFeTANDMKjqJFxDRk5L8noaGIVBVXVcQEZOC/OSGhiIQVVFHH1GTsvz%20qhoYi0FVFRx6Rk6b8MIaGI5BVQfjuDNy2orX1sCIDKo6DAedkdOGvLwGBmVQ1QE44oyctuUVNjAu%20g6reisPNyGlzXmQDQzOo6k041oycLsHrbGB0BlW9jAPNyOlCvNQGBmhQ1Qs4yoycLserbWCMBlX9%20CIeYkdNFecENDNOgqudxggEhXZrX3MBIDap6BmeXkdPVedMNTNWgqsdwahk53YP33cBsDar6DueV%20kdOdeOsNTNigqoyTysjpfrz7BuZsUNVXOKOMnO7KDmhg2gZV/Y3Tycjp3uyDBmZuUNXgXDJykjur%20g8kbVOW20vPsiQbmb1C9N84iIyf9zc5oYAoH1bviFDJy0lfsjwZmcVC9H94/IydldkkDEzmo3glv%20npGTvmOvNDCXg+o98M4ZOekxdkwD0zmoXh1vm5GTnmHfNDCjg+p18Z4ZOel5dk8DkzqoXhQvGRCS%20fsoeamBeB9XL4fUCQtJr7KQGpnZQvRBeLCMnvcxmamBwB9VL4JUyctKb2FINjO+gujleJiMnvZWN%201cAQD6rb4jUyctIBbK8GRnlQ3RAvkJGTDmOTNTDQg+pWePSMnHQwW62BsR5UN8FDZ+SkChuugeEe%20VJfH42bkpCLbroERH1QXxoNm5KQ6m6+BQR9Ul8QjZuSkk9iCDYz7oLoYHi4jJ53KRmxg6AfVZfBY%20GTlpAbZjA6M/qC6AB8rIScuwKRtYAIPqqXiUjJy0GFuzgTUwqJ6Eh8jISUuyQRtYBoPqGXiCgJC0%20MNu0gZUwqHbx2xk5aW12agNbYVBt4VczctIO7NcGdsOgejx+LyMn7cOubWBDDKpH4pcyctJu7N0G%209sSgegx+IyMn7ckObmBbDKrvxrdn5KSd2ccN7IxB9X343oyctD+7uYHNMai+A9+YkZOuwp5uYH8M%20qq/huzJy0rXY2Q1skUH1p/iWjJx0RfZ3A7tkUH0en8/ISddllzewUQbVZ/DJjJx0dfZ6A3tlUH0M%20n8nISfdgxzewXQbV75DOyEl3Yt83sGMG1YxcRk66H7u/gU0zqAaEAkLSXTkDDeybQfUT/h0Qku7N%20SWhg6wyqH/CPjJx0ew5DA4tnUP2NUkZO0m+ORAPrZ3xZ/OxPTNJHDkYDS+hhfEzSJ45HA6voAXxA%20UuCQNLCQ/omopH9yVBpYSwEhSQ9wYBpYTp/wb0kPc2waWFEf8A9JT3J4SthVbivpNY6QpJ24syTt%20xJ0laSfuLEk7cWdJ2ok7S9JO3FmSduLOkrQTd5aknbizJO3EnSVpJ+4sSTtxZ0naiTtL0k7cWZL2%208evX/6MtowumflWfAAAAAElFTkSuQmCC%22/%3E%3C/svg%3E" 9 | }, 10 | "design": { 11 | "board": "icestick", 12 | "graph": { 13 | "blocks": [ 14 | { 15 | "id": "6fb91b87-52a2-49e3-9b30-e1e36905b9a5", 16 | "type": "basic.code", 17 | "data": { 18 | "code": "\nbuf buffer(out,in);\n\n", 19 | "params": [], 20 | "ports": { 21 | "in": [ 22 | { 23 | "name": "in" 24 | } 25 | ], 26 | "out": [ 27 | { 28 | "name": "out" 29 | } 30 | ] 31 | } 32 | }, 33 | "position": { 34 | "x": 432, 35 | "y": 136 36 | }, 37 | "size": { 38 | "width": 336, 39 | "height": 96 40 | } 41 | }, 42 | { 43 | "id": "57622c0e-03ab-4a2d-8de7-4c3d010756d8", 44 | "type": "basic.input", 45 | "data": { 46 | "name": "in", 47 | "pins": [ 48 | { 49 | "index": "0", 50 | "name": "", 51 | "value": "0" 52 | } 53 | ], 54 | "virtual": true, 55 | "clock": false 56 | }, 57 | "position": { 58 | "x": 248, 59 | "y": 152 60 | } 61 | }, 62 | { 63 | "id": "921ed08e-77fe-4340-9f24-28068f3a7d85", 64 | "type": "basic.output", 65 | "data": { 66 | "name": "out1", 67 | "pins": [ 68 | { 69 | "index": "0", 70 | "name": "D5", 71 | "value": "95" 72 | } 73 | ], 74 | "virtual": true 75 | }, 76 | "position": { 77 | "x": 824, 78 | "y": 152 79 | } 80 | } 81 | ], 82 | "wires": [ 83 | { 84 | "source": { 85 | "block": "6fb91b87-52a2-49e3-9b30-e1e36905b9a5", 86 | "port": "out" 87 | }, 88 | "target": { 89 | "block": "921ed08e-77fe-4340-9f24-28068f3a7d85", 90 | "port": "in" 91 | } 92 | }, 93 | { 94 | "source": { 95 | "block": "57622c0e-03ab-4a2d-8de7-4c3d010756d8", 96 | "port": "out" 97 | }, 98 | "target": { 99 | "block": "6fb91b87-52a2-49e3-9b30-e1e36905b9a5", 100 | "port": "in" 101 | } 102 | } 103 | ] 104 | }, 105 | "state": { 106 | "pan": { 107 | "x": -1, 108 | "y": -3 109 | }, 110 | "zoom": 1 111 | } 112 | }, 113 | "dependencies": {} 114 | } --------------------------------------------------------------------------------