From 6cbafd76a3788944a45f131e5c202905b5d3d5c3 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 31 May 2019 18:06:53 +0200 Subject: [PATCH] Implement PCB top level --- logic_block.sch | 30 +-- ttl-fpga-cache.lib | 67 ++++++ ttl-fpga.sch | 498 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 570 insertions(+), 25 deletions(-) diff --git a/logic_block.sch b/logic_block.sch index 8b86d4e..1c5b1d0 100644 --- a/logic_block.sch +++ b/logic_block.sch @@ -695,9 +695,9 @@ Connection ~ 3800 2200 Wire Wire Line 3800 2200 3800 2150 Text HLabel 1000 2200 0 50 Input ~ 0 -spi_mosi +isp_mosi Text HLabel 1000 2350 0 50 Input ~ 0 -spi_sck +isp_sck Wire Wire Line 5800 5600 5350 5600 Wire Wire Line @@ -1118,7 +1118,7 @@ F 3 "" H 14100 2350 50 0001 C CNN 1 0 0 -1 $EndComp Text HLabel 1000 2500 0 50 Output ~ 0 -spi_miso +isp_miso Text Label 2600 7400 2 50 ~ 0 lut_in0 Entry Wire Line @@ -1867,7 +1867,7 @@ Text Notes 7300 5300 0 50 ~ 0 cfg[15..8] Text Label 13550 7800 0 50 ~ 0 fabric3 -Text HLabel 12850 8350 3 50 Input ~ 0 +Text HLabel 12850 8350 3 50 BiDi ~ 0 fabric_b[3..0] Connection ~ 12850 8250 Wire Bus Line @@ -1880,7 +1880,7 @@ Entry Wire Line 13050 8150 12950 8250 Entry Wire Line 13500 8150 13400 8250 -Text HLabel 12800 4750 1 50 Input ~ 0 +Text HLabel 12800 4750 1 50 BiDi ~ 0 fabric_t[3..0] Connection ~ 12800 4850 Wire Bus Line @@ -1909,7 +1909,7 @@ Text Label 12150 5350 1 50 ~ 0 fabric_t0 Wire Wire Line 12150 5400 12150 4950 -Text HLabel 10600 7150 0 50 Input ~ 0 +Text HLabel 10600 7150 0 50 BiDi ~ 0 fabric_l[3..0] Connection ~ 10750 7150 Wire Bus Line @@ -1938,7 +1938,7 @@ Text Label 11250 7800 2 50 ~ 0 fabric_l3 Wire Wire Line 11300 7800 10850 7800 -Text HLabel 14000 7100 2 50 Input ~ 0 +Text HLabel 14000 7100 2 50 BiDi ~ 0 fabric_r[3..0] Connection ~ 13900 7100 Wire Bus Line @@ -2321,6 +2321,14 @@ Wire Bus Line Connection ~ 7700 5350 Text Notes 7750 5300 0 50 ~ 0 See cfgX labels in the muxes.\nThey are connected to this bus. +Wire Wire Line + 5800 6300 5600 6300 +Wire Wire Line + 5800 6200 5600 6200 +Text HLabel 5600 6300 0 50 Input ~ 0 +rst_n +Text HLabel 5600 6200 0 50 Input ~ 0 +clk Wire Bus Line 13900 6550 13900 7100 Wire Bus Line @@ -2345,12 +2353,4 @@ Wire Bus Line 7100 2200 7100 4750 Wire Bus Line 5250 2200 5250 4750 -Wire Wire Line - 5800 6300 5600 6300 -Wire Wire Line - 5800 6200 5600 6200 -Text HLabel 5600 6300 0 50 Input ~ 0 -rst_n -Text HLabel 5600 6200 0 50 Input ~ 0 -clk $EndSCHEMATC diff --git a/ttl-fpga-cache.lib b/ttl-fpga-cache.lib index 166b886..c72984d 100644 --- a/ttl-fpga-cache.lib +++ b/ttl-fpga-cache.lib @@ -207,6 +207,73 @@ X Qb 9 550 -350 300 L 50 50 1 1 T ENDDRAW ENDDEF # +# Connector_Conn_01x12_Female +# +DEF Connector_Conn_01x12_Female J 0 40 Y N 1 F N +F0 "J" 0 600 50 H V C CNN +F1 "Connector_Conn_01x12_Female" 0 -700 50 H V C CNN +F2 "" 0 0 50 H I C CNN +F3 "" 0 0 50 H I C CNN +$FPLIST + Connector*:*_1x??_* +$ENDFPLIST +DRAW +A 0 -600 20 901 -901 1 1 6 N 0 -580 0 -620 +A 0 -500 20 901 -901 1 1 6 N 0 -480 0 -520 +A 0 -400 20 901 -901 1 1 6 N 0 -380 0 -420 +A 0 -300 20 901 -901 1 1 6 N 0 -280 0 -320 +A 0 -200 20 901 -901 1 1 6 N 0 -180 0 -220 +A 0 -100 20 901 -901 1 1 6 N 0 -80 0 -120 +A 0 0 20 901 -901 1 1 6 N 0 20 0 -20 +A 0 100 20 901 -901 1 1 6 N 0 120 0 80 +A 0 200 20 901 -901 1 1 6 N 0 220 0 180 +A 0 300 20 901 -901 1 1 6 N 0 320 0 280 +A 0 400 20 901 -901 1 1 6 N 0 420 0 380 +A 0 500 20 901 -901 1 1 6 N 0 520 0 480 +P 2 1 1 6 -50 -600 -20 -600 N +P 2 1 1 6 -50 -500 -20 -500 N +P 2 1 1 6 -50 -400 -20 -400 N +P 2 1 1 6 -50 -300 -20 -300 N +P 2 1 1 6 -50 -200 -20 -200 N +P 2 1 1 6 -50 -100 -20 -100 N +P 2 1 1 6 -50 0 -20 0 N +P 2 1 1 6 -50 100 -20 100 N +P 2 1 1 6 -50 200 -20 200 N +P 2 1 1 6 -50 300 -20 300 N +P 2 1 1 6 -50 400 -20 400 N +P 2 1 1 6 -50 500 -20 500 N +X Pin_1 1 -200 500 150 R 50 50 1 1 P +X Pin_10 10 -200 -400 150 R 50 50 1 1 P +X Pin_11 11 -200 -500 150 R 50 50 1 1 P +X Pin_12 12 -200 -600 150 R 50 50 1 1 P +X Pin_2 2 -200 400 150 R 50 50 1 1 P +X Pin_3 3 -200 300 150 R 50 50 1 1 P +X Pin_4 4 -200 200 150 R 50 50 1 1 P +X Pin_5 5 -200 100 150 R 50 50 1 1 P +X Pin_6 6 -200 0 150 R 50 50 1 1 P +X Pin_7 7 -200 -100 150 R 50 50 1 1 P +X Pin_8 8 -200 -200 150 R 50 50 1 1 P +X Pin_9 9 -200 -300 150 R 50 50 1 1 P +ENDDRAW +ENDDEF +# +# Connector_TestPoint +# +DEF Connector_TestPoint TP 0 30 N N 1 F N +F0 "TP" 0 270 50 H V C CNN +F1 "Connector_TestPoint" 0 200 50 H V C CNN +F2 "" 200 0 50 H I C CNN +F3 "" 200 0 50 H I C CNN +$FPLIST + Pin* + Test* +$ENDFPLIST +DRAW +C 0 130 30 0 1 0 N +X 1 1 0 0 100 U 50 50 1 1 P +ENDDRAW +ENDDEF +# # Device_C # DEF Device_C C 0 10 N Y 1 F N diff --git a/ttl-fpga.sch b/ttl-fpga.sch index 23eff01..785c7ab 100644 --- a/ttl-fpga.sch +++ b/ttl-fpga.sch @@ -14,19 +14,497 @@ Comment2 "" Comment3 "" Comment4 "" $EndDescr +$Comp +L Connector:Conn_01x12_Female J? +U 1 1 5FF9C386 +P 8200 3850 +F 0 "J?" H 8150 4450 50 0000 C CNN +F 1 "Right" H 8100 3200 50 0000 C CNN +F 2 "" H 8200 3850 50 0001 C CNN +F 3 "~" H 8200 3850 50 0001 C CNN + 1 8200 3850 + 1 0 0 -1 +$EndComp +Wire Wire Line + 8000 3350 7900 3350 +Wire Wire Line + 7900 3350 7900 3250 +$Comp +L power:VCC #PWR? +U 1 1 5FF9C392 +P 7900 3250 +F 0 "#PWR?" H 7900 3100 50 0001 C CNN +F 1 "VCC" H 7917 3423 50 0000 C CNN +F 2 "" H 7900 3250 50 0001 C CNN +F 3 "" H 7900 3250 50 0001 C CNN + 1 7900 3250 + -1 0 0 -1 +$EndComp +$Comp +L power:GNDD #PWR? +U 1 1 5FF9C39C +P 7800 3450 +F 0 "#PWR?" H 7800 3200 50 0001 C CNN +F 1 "GNDD" V 7804 3340 50 0000 R CNN +F 2 "" H 7800 3450 50 0001 C CNN +F 3 "" H 7800 3450 50 0001 C CNN + 1 7800 3450 + 0 1 -1 0 +$EndComp +Wire Wire Line + 7800 3450 8000 3450 +Wire Wire Line + 7200 3750 7200 3300 +Wire Wire Line + 8000 3750 7200 3750 +Wire Wire Line + 7300 3650 7300 3100 +Wire Wire Line + 8000 3650 7300 3650 +Wire Wire Line + 7400 3550 7400 3000 +Wire Wire Line + 8000 3550 7400 3550 +Text Label 7550 4450 0 50 ~ 0 +fabric_r3 +Text Label 7550 4350 0 50 ~ 0 +fabric_r2 +Text Label 7550 4250 0 50 ~ 0 +fabric_r1 +Text Label 7550 4150 0 50 ~ 0 +fabric_r0 +Wire Wire Line + 8000 4450 7550 4450 +Wire Wire Line + 8000 4350 7550 4350 +Wire Wire Line + 8000 4250 7550 4250 +Wire Wire Line + 8000 4150 7550 4150 +Entry Wire Line + 7550 4250 7450 4150 +Entry Wire Line + 7550 4350 7450 4250 +Entry Wire Line + 7550 4450 7450 4350 +Entry Wire Line + 7550 4150 7450 4050 +Wire Bus Line + 7450 4050 6800 4050 +Wire Wire Line + 4450 3300 4450 3250 +Wire Wire Line + 5000 3250 5000 3300 +Wire Wire Line + 5000 3300 5650 3300 +Wire Wire Line + 4450 3250 5000 3250 +Connection ~ 4450 3300 +Wire Wire Line + 4450 3300 4550 3300 +Wire Wire Line + 4450 3100 4450 3050 +Wire Wire Line + 4450 3050 5000 3050 +Wire Wire Line + 5000 3050 5000 3100 +Wire Wire Line + 5000 3100 5550 3100 +Connection ~ 4450 3100 +Wire Wire Line + 4450 3100 4550 3100 +Wire Wire Line + 4950 3000 4950 2950 +Wire Wire Line + 4950 2950 4450 2950 +Wire Wire Line + 4950 3000 5450 3000 +Wire Wire Line + 4450 3000 4550 3000 +Wire Wire Line + 4450 2950 4450 3000 +Connection ~ 4450 3000 +Wire Wire Line + 4200 3400 4300 3400 +Wire Wire Line + 3900 3000 4450 3000 +Wire Wire Line + 4000 3100 4450 3100 +Wire Wire Line + 4100 3300 4450 3300 +Entry Wire Line + 3900 4250 3800 4150 +Entry Wire Line + 3900 4550 3800 4450 +Entry Wire Line + 3900 4450 3800 4350 +Entry Wire Line + 3900 4350 3800 4250 +Wire Wire Line + 3350 4150 3800 4150 +Wire Wire Line + 3350 4250 3800 4250 +Wire Wire Line + 3350 4350 3800 4350 +Wire Wire Line + 3350 4450 3800 4450 +Text Label 3800 4150 2 50 ~ 0 +fabric_l0 +Text Label 3800 4250 2 50 ~ 0 +fabric_l1 +Text Label 3800 4350 2 50 ~ 0 +fabric_l2 +Text Label 3800 4450 2 50 ~ 0 +fabric_l3 +Wire Wire Line + 3350 3550 3900 3550 +Wire Wire Line + 3900 3550 3900 3000 +Wire Wire Line + 3350 3650 4000 3650 +Wire Wire Line + 4000 3650 4000 3100 +Wire Wire Line + 3350 3750 4100 3750 +Wire Wire Line + 4100 3750 4100 3300 +Wire Wire Line + 3350 3850 4200 3850 +Wire Wire Line + 4200 3850 4200 3400 +Wire Wire Line + 3550 3450 3350 3450 +$Comp +L power:GNDD #PWR? +U 1 1 5FE8BD0F +P 3550 3450 +F 0 "#PWR?" H 3550 3200 50 0001 C CNN +F 1 "GNDD" V 3554 3340 50 0000 R CNN +F 2 "" H 3550 3450 50 0001 C CNN +F 3 "" H 3550 3450 50 0001 C CNN + 1 3550 3450 + 0 -1 -1 0 +$EndComp +$Comp +L power:VCC #PWR? +U 1 1 5FE8B843 +P 3450 3250 +F 0 "#PWR?" H 3450 3100 50 0001 C CNN +F 1 "VCC" H 3467 3423 50 0000 C CNN +F 2 "" H 3450 3250 50 0001 C CNN +F 3 "" H 3450 3250 50 0001 C CNN + 1 3450 3250 + 1 0 0 -1 +$EndComp +Wire Wire Line + 3450 3350 3450 3250 +Wire Wire Line + 3350 3350 3450 3350 +$Comp +L Connector:Conn_01x12_Female J? +U 1 1 5FE88CA2 +P 3150 3850 +F 0 "J?" H 3100 4450 50 0000 C CNN +F 1 "Left" H 3050 3200 50 0000 C CNN +F 2 "" H 3150 3850 50 0001 C CNN +F 3 "~" H 3150 3850 50 0001 C CNN + 1 3150 3850 + -1 0 0 -1 +$EndComp +Wire Wire Line + 6800 3400 7100 3400 +Text Label 3950 4550 0 50 ~ 0 +fabric_l[3..0] +Wire Wire Line + 7100 3400 7100 3850 +Wire Wire Line + 7100 3850 8000 3850 +Wire Wire Line + 3350 3950 8000 3950 +Text Notes 3100 4500 2 63 ~ 0 +VCC\nGND\nCLK\nRST\nSCK\nMOSI\nMISO\nMOSI_D\nI0\nI1\nI2\nI3 +Text Notes 8250 4500 0 63 ~ 0 +VCC\nGND\nCLK\nRST\nSCK\nmiso\nmosi\n\nI0\nI1\nI2\nI3 +Wire Wire Line + 5250 5600 5250 5550 +$Comp +L power:VCC #PWR? +U 1 1 60046AFF +P 5250 5550 +F 0 "#PWR?" H 5250 5400 50 0001 C CNN +F 1 "VCC" H 5150 5650 50 0000 C CNN +F 2 "" H 5250 5550 50 0001 C CNN +F 3 "" H 5250 5550 50 0001 C CNN + 1 5250 5550 + 1 0 0 -1 +$EndComp +$Comp +L power:GNDD #PWR? +U 1 1 60046AF5 +P 5200 5200 +F 0 "#PWR?" H 5200 4950 50 0001 C CNN +F 1 "GNDD" H 5204 5045 50 0000 C CNN +F 2 "" H 5200 5200 50 0001 C CNN +F 3 "" H 5200 5200 50 0001 C CNN + 1 5200 5200 + 1 0 0 -1 +$EndComp +Wire Wire Line + 5200 5150 5350 5150 +Wire Wire Line + 5350 5150 5350 5600 +Text Label 6350 5150 3 50 ~ 0 +fabric_b3 +Text Label 6250 5150 3 50 ~ 0 +fabric_b2 +Text Label 6150 5150 3 50 ~ 0 +fabric_b1 +Text Label 6050 5150 3 50 ~ 0 +fabric_b0 +Wire Wire Line + 6350 5600 6350 5150 +Wire Wire Line + 6250 5600 6250 5150 +Wire Wire Line + 6150 5600 6150 5150 +Wire Wire Line + 6050 5600 6050 5150 +Entry Wire Line + 6250 5150 6350 5050 +Entry Wire Line + 6150 5150 6250 5050 +Entry Wire Line + 6050 5150 6150 5050 +Entry Wire Line + 6350 5150 6450 5050 $Sheet -S 4450 2100 2250 2250 +S 4550 2700 2250 2250 U 5D77FDBE F0 "LogicBlock" 50 F1 "logic_block.sch" 50 -F2 "spi_mosi" I L 4450 2550 50 -F3 "spi_sck" I L 4450 2450 50 -F4 "spi_miso" O L 4450 2350 50 -F5 "fabric_b[3..0]" I L 4450 4250 50 -F6 "fabric_t[3..0]" I R 6700 2200 50 -F7 "fabric_l[3..0]" I L 4450 3250 50 -F8 "fabric_r[3..0]" I R 6700 3250 50 -F9 "rst_n" I L 4450 3750 50 -F10 "clk" I L 4450 3850 50 +F2 "fabric_b[3..0]" I R 6800 4850 50 +F3 "fabric_t[3..0]" I R 6800 2800 50 +F4 "fabric_l[3..0]" I L 4550 4550 50 +F5 "fabric_r[3..0]" I R 6800 4050 50 +F6 "rst_n" I L 4550 3100 50 +F7 "clk" I L 4550 3000 50 +F8 "isp_mosi" I L 4550 3400 50 +F9 "isp_sck" I L 4550 3300 50 +F10 "isp_miso" O R 6800 3400 50 $EndSheet +Wire Bus Line + 6800 4850 6900 4850 +Wire Bus Line + 6900 4850 6900 5050 +Wire Wire Line + 5450 5600 5450 3000 +Connection ~ 5450 3000 +Wire Wire Line + 5450 3000 7400 3000 +Wire Wire Line + 5550 5600 5550 3100 +Connection ~ 5550 3100 +Wire Wire Line + 5550 3100 7300 3100 +Wire Wire Line + 5650 5600 5650 3300 +Connection ~ 5650 3300 +Wire Bus Line + 3900 4550 4550 4550 +Wire Wire Line + 5750 4050 5750 5600 +Wire Wire Line + 3350 4050 5750 4050 +$Comp +L Connector:Conn_01x12_Female J? +U 1 1 60046B0B +P 5750 5800 +F 0 "J?" H 5700 6400 50 0000 C CNN +F 1 "Left" H 5650 5150 50 0000 C CNN +F 2 "" H 5750 5800 50 0001 C CNN +F 3 "~" H 5750 5800 50 0001 C CNN + 1 5750 5800 + 0 -1 1 0 +$EndComp +Text Notes 6400 5850 3 63 ~ 0 +VCC\nGND\nCLK\nRST\nSCK\nMOSI_D\n\n\nI0\nI1\nI2\nI3 +$Comp +L Connector:Conn_01x12_Female J? +U 1 1 60090C3D +P 5750 1850 +F 0 "J?" H 5700 2450 50 0000 C CNN +F 1 "Left" H 5650 1200 50 0000 C CNN +F 2 "" H 5750 1850 50 0001 C CNN +F 3 "~" H 5750 1850 50 0001 C CNN + 1 5750 1850 + 0 -1 -1 0 +$EndComp +Text Notes 6400 1800 1 63 ~ 0 +VCC\nGND\nCLK\nRST\nSCK\nMOSI_D\n\n\nI0\nI1\nI2\nI3 +$Comp +L power:VCC #PWR? +U 1 1 600A7963 +P 5150 2150 +F 0 "#PWR?" H 5150 2000 50 0001 C CNN +F 1 "VCC" H 5250 2200 50 0000 C CNN +F 2 "" H 5150 2150 50 0001 C CNN +F 3 "" H 5150 2150 50 0001 C CNN + 1 5150 2150 + -1 0 0 -1 +$EndComp +Wire Wire Line + 5250 2250 5150 2250 +Wire Wire Line + 5250 2050 5250 2250 +Text Label 6350 2500 1 50 ~ 0 +fabric_t3 +Text Label 6250 2500 1 50 ~ 0 +fabric_t2 +Text Label 6150 2500 1 50 ~ 0 +fabric_t1 +Text Label 6050 2500 1 50 ~ 0 +fabric_t0 +Wire Wire Line + 6350 2050 6350 2500 +Wire Wire Line + 6250 2050 6250 2500 +Wire Wire Line + 6150 2050 6150 2500 +Wire Wire Line + 6050 2050 6050 2500 +Entry Wire Line + 6250 2500 6350 2600 +Entry Wire Line + 6150 2500 6250 2600 +Entry Wire Line + 6050 2500 6150 2600 +Entry Wire Line + 6350 2500 6450 2600 +Wire Bus Line + 6900 2800 6800 2800 +Wire Bus Line + 6900 2600 6900 2800 +Text Label 6250 5050 0 50 ~ 0 +fabric_b[3..0] +Text Label 6450 2600 0 50 ~ 0 +fabric_t[3..0] +Wire Wire Line + 5450 2050 5450 3000 +Wire Wire Line + 5550 3100 5550 2050 +Wire Wire Line + 5650 3300 7200 3300 +Wire Wire Line + 5650 3300 5650 2050 +Wire Notes Line + 6400 3400 4950 3400 +Wire Notes Line + 6400 3400 6300 3350 +Wire Notes Line + 6400 3400 6300 3450 +Text Label 6850 4050 0 50 ~ 0 +fabric_r[3..0] +Wire Wire Line + 5750 2050 5750 2500 +Wire Wire Line + 5750 2500 4300 2500 +Wire Wire Line + 4300 2500 4300 3400 +Connection ~ 4300 3400 +Wire Wire Line + 4300 3400 4550 3400 +$Comp +L Connector:TestPoint TP? +U 1 1 6010FDC8 +P 7900 4050 +F 0 "TP?" V 7900 4300 50 0000 C CNN +F 1 "mosi_d" V 7900 3550 50 0000 C CNN +F 2 "" H 8100 4050 50 0001 C CNN +F 3 "~" H 8100 4050 50 0001 C CNN + 1 7900 4050 + 0 -1 -1 0 +$EndComp +Wire Wire Line + 8000 4050 7900 4050 +Wire Notes Line + 8550 3850 8650 3850 +Wire Notes Line + 8550 3950 8600 3900 +Wire Notes Line + 8550 3950 8600 4000 +Wire Notes Line + 8650 3950 8550 3950 +Wire Notes Line + 8650 3850 8650 3950 +Wire Notes Line + 2850 3950 2600 3950 +Wire Notes Line + 2600 3950 2600 4050 +Wire Notes Line + 2600 4050 2700 4050 +Wire Notes Line + 2650 4000 2700 4050 +Wire Notes Line + 2700 4050 2650 4100 +Wire Notes Line + 2450 3850 2850 3850 +Wire Notes Line + 2850 3850 2800 3800 +Wire Notes Line + 2850 3850 2800 3900 +Wire Notes Line + 5750 6200 5750 6350 +Wire Notes Line + 5750 6350 5700 6300 +Wire Notes Line + 5750 6350 5800 6300 +Wire Notes Line + 5750 1300 5750 1450 +Wire Notes Line + 5750 1450 5700 1400 +Wire Notes Line + 5750 1450 5800 1400 +Text Notes 1900 3850 0 50 ~ 0 +PROGRAMMER +Wire Notes Line + 2850 3750 2450 3750 +Wire Notes Line + 2850 3750 2800 3700 +Wire Notes Line + 2850 3750 2800 3800 +Wire Notes Line + 2450 3650 2450 3950 +Wire Notes Line + 2450 3950 1850 3950 +Wire Notes Line + 1850 3950 1850 3650 +Wire Notes Line + 1850 3650 2450 3650 +Wire Wire Line + 5850 5600 5850 2050 +Wire Wire Line + 5350 2250 5350 2050 +$Comp +L power:GNDD #PWR? +U 1 1 600A7959 +P 5350 2250 +F 0 "#PWR?" H 5350 2000 50 0001 C CNN +F 1 "GNDD" H 5354 2095 50 0000 C CNN +F 2 "" H 5350 2250 50 0001 C CNN +F 3 "" H 5350 2250 50 0001 C CNN + 1 5350 2250 + -1 0 0 -1 +$EndComp +Wire Wire Line + 5150 2250 5150 2150 +Wire Wire Line + 5200 5150 5200 5200 +Wire Bus Line + 7450 4050 7450 4350 +Wire Bus Line + 3900 4250 3900 4550 +Wire Bus Line + 6150 2600 6900 2600 +Wire Bus Line + 6150 5050 6900 5050 $EndSCHEMATC