Saturday, April 30, 2022
vivado rgb light
//add source -> verilog file
//rgb.v
`timescale 1ns / 1ps
module rgb(
input wire [3:0] switch,
output wire red,
output wire green,
output wire blue
);
assign red = ~switch[3] & ~switch[2];
assign blue = (~switch[3] & switch[2]) | (switch[3] & ~switch[2] & ~switch[1]);
assign green = (switch[3] & ~switch[2] & switch[1]) | (switch[3] & switch[2]);
endmodule
---------------------
//right click simulation -> add verilog file
//testbench.v
`timescale 10ns / 1ps
module testbench;
//input
reg [3:0] switch = 0;
//output
wire red;
wire green;
wire blue;
//unit under test
rgb rgb(
.switch(switch),
.red(red),
.green(green),
.blue(blue)
);
integer k = 0;
initial
begin
switch=0;
for(k=0; k<16; k=k+1)
#10 switch = k; //100ns
#5 $finish;
end
endmodule
-----------------
//run behavioral simulation
drag and drop top left to zoom out, bottom right to zoom in
reference:
vivado mux
download and install vivado @ https://www.xilinx.com/support/download.html
add a verilog file to design source
run rtl analysis
reference:Thursday, April 28, 2022
Wednesday, April 27, 2022
Monday, April 25, 2022
blender well 5
ctrl+alt+num pad 0 to center camera view
change focal length, increase end distance
reference:
Sunday, April 24, 2022
blender well 4
add three point lights, add area light in well center
in shading tab, scene property->film->transparent to set background transparent
shift+click beams, shift+click colored pole last, ctrl+L to link materials
create 3 color materials for roof
tab to edit, L to select each tile, assign different colors
reuse the materials on one roof to the other
assign material varieties to bricks and stones
reference:
Saturday, April 23, 2022
blender well 3
add beam to roof, turn on proportional editing, move rope and beam
shift+a to add a circle, f to fill circle, add solidify modifier for base plane
shift+a ico sphere, change vertices to 1
proportional edit, rotate so they look like stones
reference:
Thursday, April 21, 2022
blender rope
shift+a->cylinder, select 8 vertices, rotate cylinder
ctrl+r to loop cut->scroll to increase loops,
2 to edge select, shift+alt+click to include loops on both ends, ctrl+b to bevel
3 to select face, shift+alt+click to select loop faces
change to pivot around individual origin
e to extrude, s to scale, shift+x to cancel x direction scale
2 to select edges, shift+alt+click to select loop cut, x to desolve
shift+alt+click to select inside cylinder faces
s+x to scale along x, side faces on big cylinders are auto tapered
reference:
Tuesday, April 19, 2022
blender tile 2
in edit mode, p->seperate by parts
in object mode, object->set origin->to geometry
in object mode, ctrl+j to join
in edit mode, L to select individual item, Alt+A to deselect all
bring tiles on the roof
shift+right click to center at tile center
shift+A->lattice->scale->rotate (double press axis for local axis)
shape lattice so that tiles are encapsulated
lattice property->change resolution to 5
select tiles first then lattice->ctrl+p->lattice deform
select lattice->tab to edit mode->lift up edges->sink in middle
tiles follow lattice to deform into concave shape.
select tile->m to create a new collection (tiles)
select lattice->m to move lattice to tiles collection
reference:
Monday, April 18, 2022
blender beam
in object mode, shift+d duplicate, ctrl+j join, object->convert to->mesh apply all modifier
in edit mode, 2 select edge, alt+click select loop, x remove loop or edge
3 select face, r rotate, g move
Sunday, April 17, 2022
Saturday, April 16, 2022
Friday, April 15, 2022
OpenVPN setup
test openssl is installed
>openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
generate certificate
download easy-rsa @ https://github.com/OpenVPN/easy-rsa-old
extract, copy openssl-1.0.0.cnf from 2.0 folder to windows
>init-config
in vars.bat, change openssl.exe path, and easy-rsa path
rem Alternatively define the PATH to openssl.exe manually
set "PATH=%PATH%;C:\Program Files\OpenSSL-Win64\bin"
set HOME=C:\Users\zchen\Downloads\easy-rsa-old-master\easy-rsa\Windows
set KEY_CONFIG=openssl-1.0.0.cnf
>>clean-all
The system cannot find the file specified.
1 file(s) copied.
1 file(s) copied.
>build-ca
>build-key-server server
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:abcd
An optional company name []:abcd
Using configuration from openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'US'
stateOrProvinceName :PRINTABLE:'CA'
localityName :PRINTABLE:'SanFrancisco'
organizationName :PRINTABLE:'OpenVPN'
organizationalUnitName:PRINTABLE:'changeme'
commonName :PRINTABLE:'changeme'
name :PRINTABLE:'changeme'
emailAddress :IA5STRING:'mail@host.domain'
Certificate is to be certified until Apr 13 15:32:32 2032 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
>build-key client1
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:abcd
An optional company name []:abcd
Using configuration from openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'US'
stateOrProvinceName :PRINTABLE:'CA'
localityName :PRINTABLE:'SanFrancisco'
organizationName :PRINTABLE:'OpenVPN'
organizationalUnitName:PRINTABLE:'changeme'
commonName :PRINTABLE:'changeme'
name :PRINTABLE:'bob'
emailAddress :IA5STRING:'mail@host.domain'
Certificate is to be certified until Apr 13 16:00:20 2032 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
>build-dh
Generating DH parameters, 2048 bit long safe prime
add openvpn.exe path (C:\Program Files\OpenVPN\bin) to environment variable -> user variable -> Path -> new
>openvpn --genkey tls-auth ta.key
right click on openvpn icon in the task bar -> setting -> copy config path
copy server files into config folder
server starts
copy client files to config folder in client laptop
in client.opvn file, remote my-server-1 1194, replace my-server-1 with server name
client successfully connected to server
//server log
Sat Apr 16 13:48:29 2022 Initialization Sequence Completed
Sat Apr 16 13:48:29 2022 MANAGEMENT: >STATE:1650138509,CONNECTED,SUCCESS,10.8.0.1,,,,
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 TLS: Initial packet from [AF_INET6]::ffff:192.168.0.34:55176, sid=b83b63c5 fccaa0bd
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 VERIFY OK: depth=1, C=US, ST=CA, L=SanFrancisco, O=OpenVPN, OU=changeme, CN=changeme, name=changeme, emailAddress=mail@host.domain
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 VERIFY OK: depth=0, C=US, ST=CA, L=SanFrancisco, O=OpenVPN, OU=changeme, CN=changeme, name=bob, emailAddress=mail@host.domain
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_VER=2.5.6
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_PLAT=win
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_PROTO=6
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_NCP=2
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_CIPHERS=AES-256-GCM:AES-128-GCM:AES-256-CBC
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_LZ4=1
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_LZ4v2=1
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_LZO=1
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_COMP_STUB=1
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_COMP_STUBv2=1
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_TCPNL=1
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_GUI_VER=OpenVPN_GUI_11
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 peer info: IV_SSO=openurl,crtext
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA256
Sat Apr 16 13:49:34 2022 192.168.0.34:55176 [changeme] Peer Connection Initiated with [AF_INET6]::ffff:192.168.0.34:55176
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 MULTI: Learn: 10.8.0.6 -> changeme/192.168.0.34:55176
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 MULTI: primary virtual IP for changeme/192.168.0.34:55176: 10.8.0.6
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 Data Channel: using negotiated cipher 'AES-256-GCM'
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Apr 16 13:49:34 2022 changeme/192.168.0.34:55176 SENT CONTROL [changeme]: 'PUSH_REPLY,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-GCM' (status=1)
reference:
install openssl
create configuration files
generate CA certificate
Cannot pre-load keyfile (ta.key)
"Insufficient key material or header text not found in file '[[INLINE]]' (0/128/256 bytes found/min/max)"
Thursday, April 14, 2022
blender tiles 1
shift+right click to change center
shift+a -> plane
tab to edit mode
ctrl+r+scroll wheel to create 2 loop cuts
extend 2 vertice at loop cut
shift+d to duplicate 2 times
ctrl+r to create horizontal loop cut
press k and draw a line between loop cut intersect and edge
select face and delete
create non-uniformity by move vertices
in object mode, shift select all three tiles
tab to edit mode
press a to select all faces
press e to extrude
press r to rotate tiles, move tiles to overlap them
hold shift to select multiple
shift+d to duplicate
press r to rotate
select all tiles -> ctrl+j to join all to a plane
in sculpting mode, use grab to create variation
press f to change size of area
reference:
Wednesday, April 13, 2022
blender well 2
select all cubes -> press m -> new collection
tab to enter edit mode, press o to turn on proportional editing
press 0 for vertices select
grab vertices to make well uneven
shift+a -> add a box -> scale box ->ctrl+a to apply scale
g to move pole -> tab to edit mode -> ctrl+b to bevel
reference:
Tuesday, April 12, 2022
blender well 1
tab to enter edit mode
press 2 to select edges
ctrl+b to bevel edges
shift+d to duplicate -> press x to move on x
press z -> select wireframe mode
select right face -> g+x to entend
ctrl+r to loop cut in middle
add 3rd box, create 2 loop cut
duplicate 3 times
z -> solid mode
modifier -> simple deform -> bend, 360 degree, z axis
object -> set origin -> origin to geometry
press n -> set x, y, z to 0 to center origin
shift+d to duplicate
s to scale down
r to rotate
duplicate 2 more rings
reference:
Subscribe to:
Posts (Atom)