Note 6 - Debt (Details Textual) - USD ($) | Mar. 18, 2016 | Jun. 30, 2017 | Jul. 01, 2016 | Feb. 14, 2017 | Dec. 30, 2016 |
Long-term Debt | | $ 14,029,000 | | | $ 13,744,000 |
Payments of Debt Issuance Costs | | 42,000 | $ 1,528,000 | | |
Additional Paid in Capital | | 122,977,000 | | | $ 121,806,000 |
Derivative Liability | | 600,000 | | | |
Warrant [Member] | | | | | |
Derivative Liability | $ 500,000 | $ 600,000 | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Warrant [Member] | | | | | |
Additional Paid in Capital | 200,000 | | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loan B Funded [Member] | | | | | |
Debt Covenant, Minimum Percentage of Forecasted Revenues Required | | 75.00% | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Revolving Credit Facility [Member] | | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | $ 5,000,000 | | | |
Line of Credit Facility, Borrowing Base as Percentage of Accounts Receivable | | 80.00% | | | |
Debt Instrument, Interest Rate Floor | | 6.95% | | | |
Long-term Debt | | $ 0 | | | |
Line of Credit Facility, Commitment Fee Amount | 25,000 | | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Revolving Credit Facility [Member] | Prime Rate [Member] | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | 3.45% | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | Piper Jaffray [Member] | | | | | |
Payments of Debt Issuance Costs | $ 1,125,000 | | | | |
Debt Instrument, Arrangement Fee, Percentage | 2.50% | | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | | | | | |
Debt Agreement, Maximum Borrowing Capacity | | $ 40,000,000 | | | |
Debt Instrument, Interest Rate During Period | | 8.15% | | | |
Debt Instrument, Percentage of Funded Loan Amounts due at Maturity | | 7.75% | | | |
Debt Instrument, Interest Rate Floor | | 7.65% | | | |
Debt Instrument, Commitment Fee Amount | $ 200,000 | | | | |
Debt Instrument, Amendment Fee | | | | $ 25,000 | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | If Term Loan B Not Funded, Beginning January, 2018 [Member] | | | | | |
Debt Instrument, Number of Monthly Principal and Interest Payments | | 33 | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | If Term Loan B Funded, Beginning April, 2018 [Member] | | | | | |
Debt Instrument, Number of Monthly Principal and Interest Payments | | 30 | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | Prepayment in First Year After Initial Closing [Member] | | | | | |
Debt Instrument, Prepayment Fee Percentage | | 3.00% | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | Prepayment in Second Year After Initial Closing [Member] | | | | | |
Debt Instrument, Prepayment Fee Percentage | | 2.00% | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | Prepayment After Second Year After Initial Closing [Member] | | | | | |
Debt Instrument, Prepayment Fee Percentage | | 1.00% | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans [Member] | Prime Rate [Member] | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | 4.15% | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loan A [Member] | | | | | |
Debt Agreement, Maximum Borrowing Capacity | | $ 15,000,000 | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loan B [Member] | | | | | |
Debt Agreement, Maximum Borrowing Capacity | | 12,500,000 | | | |
Debt Covenant, Minimum Revenue Required for Trailing Six Months | | 13,500,000 | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loan C [Member] | | | | | |
Debt Agreement, Maximum Borrowing Capacity | | 12,500,000 | | | |
Debt Covenant, Minimum Revenue Required for Trailing Six Months | | $ 20,000,000 | | | |
Oxford Finance LLC and Silicon Valley Bank [Member] | Term Loans B and C [Member] | | | | | |
Debt Covenant, Maximum Number of Days to Draw Loan After Revenue Requirement | | 60 days | | | |
Debt Instrument, Commitment Fee Percentage | | 2.00% | | | |
Oxford Finance LLC [Member] | | | | | |
Class of Warrant or Right, Issued During Period | 56,533 | | | | |
Class of Warrant or Right, Issued During Period, Exercise Price | $ 5.97 | | | | |
Silicon Valley Bank [Member] | | | | | |
Class of Warrant or Right, Issued During Period | 56,533 | | | | |
Class of Warrant or Right, Issued During Period, Exercise Price | $ 5.97 | | | | |
Silicon Valley Bank [Member] | Term Loan B Funded [Member] | | | | | |
Class of Warrant or Right, Increase to Warrant, Percentage of Loan Divided by Market Value of Common Stock | 4.50% | | | | |