human
I am working on the file "PYNQLearn/FabricOnly/.ipynb_checkpoints/myHDL_PYNQZ12_FabricOnly-checkpoint.ipynb".
The first task is:
Board Verification
Project 2: 2 Switchs 4 LEDS
https://timetoexplore.net/blog/arty-fpga-verilog-01
myHDL Code
Can you write Python program for it?

Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

@block
def S2L4(sw, clk, led):
    """
    FPGA Hello world of two switchs controlling four LED based on
    https://timetoexplore.net/blog/arty-fpga-verilog-01
    
    Target:
        ZYNQ 7000 Board (Arty, PYNQ-Z1, PYNQ-Z2) with at least 2 
        switchs and 4 leds
    
    
    Input:
        sw(2bitVec):switch input
        clk(bool): clock input    
    Ouput:
        led(4bitVec): led output
        
    """

    
    @always(clk.posedge)
    def logic():
        if sw[0]==0:
            led.next[2:]=0
        else:
            led.next[2:]=3
            
        if sw[1]==0:
            led.next[4:2]=0
        else:
            led.next[4:2]=3
    
    return instances()